[SOLVED] React-apollo 2.0 and redux


#1

Hi, guys
And how now I can use redux store in my app?! I need redux store in my app, but

<ApolloProvider client={client} store={store}>
   ...
</ApolloProvider>

not working now. And what I have to do?!


#2

You seem to be doing things correctly, but I don’t see enough of the code to completely confirm. Double check this: http://dev.apollodata.com/react/redux.html


#3

But it was correct for v. 1.x…
And information from this site is outdated…


#4

Here more actual https://www.apollographql.com/docs/react/2.0-migration.html#redux


#5

Solved by this one:

import { Provider } from 'react-redux'

<ApolloProvider client={client}>
  <Provider store={store}>
    ...
  </Provider>
</ApolloProvider>

Ugly, but it works