Closed scf4 closed 7 years ago
That's surprising - what does the redux dev tools say about the initial store state?
Here's where the error is thrown: https://github.com/apollostack/apollo-client/blob/992a13deb82b43a82e7392aae21ef349a2b98a5d/src/ApolloClient.ts#L421
I guess there's no store it can connect to. I must be missing something very simple, surely?
I'm heading to bed but will take a look tomorrow. Thanks!
Oh, for redux dev tools to work you have to do something like this: https://github.com/zalmoxisus/redux-devtools-extension#12-advanced-store-setup
Kinda surprised the react boilerplate doesn't do it by default.
Weird, looks like they do have it: https://github.com/mxstbr/react-boilerplate/blob/3fdad6a888b68e2c538dfcd52f4594fea7b9e4d4/app/store.js#L26
Perhaps the store is actually being initialized in the wrong place somehow?
NB: this is the same issue as https://github.com/apollostack/react-apollo/issues/267
Solved it. I think the main issue was missing the client
in this line in app.js
:
const store = configureStore(initialState, apolloClient, browserHistory);
It was very simple to implement otherwise. Thanks to @denisNeustroev
I followed the Apollo client docs and got this:
ApolloClient.js:163 Uncaught Error: Existing store does not use apolloReducer. Please make sure the store is properly configured and "reduxRootSelector" is correctly specified.(…)
Full diff here: https://github.com/scf4/react-boilerplate-graphql-test/commit/726e8c247c3bdb595882c91caa170b7dbdf29a8c