Coder Social home page Coder Social logo

Comments (2)

kanzitelli avatar kanzitelli commented on June 12, 2024 1

Hello, @perrosnk!

Thank you for your words!
I have stopped working with RN about a half year ago and never used it with Apollo 2. But I have read that thread about integrating Apollo 2 and checked some code in RNN repo and Apollo 2 repos and I have come up with the idea that might help you: what if you create another store, let's say ApolloClient, configure your client there and then it will be available in /src/utils/MobxRnnProvider.js and you will have an access to your store where you can get configured client from through this.props.store['ApolloClient'].

And wrap it all with ApolloProvider from react-apollo:

render() {
    return(
      <ApolloProvider client={this.props.store['ApolloClient'].client}>
        { Children.only(this.props.children) }
      </ApolloProvider>
    )
  }

add this code in the end of /src/utils/MobxRnnProvider.js
gist

I am not sure if it's going to work but at least it might lead you to the actual solution. Let me know how it goes 🙃

from react-native-navigation-mobx-boilerplate.

perrosnk avatar perrosnk commented on June 12, 2024 1

@kanzitelli Honestly, there is no way to thank you as much as I want! I have spent so many hours trying to find a way, and you really saved my day!!

from react-native-navigation-mobx-boilerplate.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.