react-native-offline: could not find "store"
I always get this error although i wrapped my component in redux provider

my code `export default class App extends Component {
render() {
return (
<Provider store={store}>
<ReduxNetworkProvider >
<WelcomeSwitch />
</ReduxNetworkProvider>
</Provider>
);
} } `
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 31 (4 by maintainers)
@souvik-ghosh, @ghorbani-m, @abudahsh, @gams95 could you please tell me the versions of
react-reduxthat you are using?My guess is that you need to upgrade react-redux to the latest, 6.0.0. If you are using v5.x, it won’t work because the don’t support the new React Context API that this library leverages. I glanced at the breaking changes and nothing major, therefore the upgrade should be smooth.
Please confirm and I’ll add that documentation to the docs.
My “react-redux”: “^7.1.0” and got same issues
Same error here with react-redux 7.0.4 and react-navigation.
@rgommezz any example on how to implement ReduxNetworkProvider with PersistGate from redux-persist?
Stil have error on
react-redux v7.1.1I’m experiencing this problem, and upgrading react-redux didn’t help 😃
Versions: react-native-offline@4.1.2 react-redux@6.0.0 react@16.6.1
stores.js
app.js
Am I doing anything wrong?
For all people having this error, be careful to have only one version of
react-reduxin your dependencies lock file (yarn.lockorpackage-lock.json).Installing this (amazing) package added another version of
react-reduxthan the one in mypackage.json, and turned into this issue. So, I fixed it settingreact-reduxto a fixed version (to only have one version resolved).Hope this help 👍
What it worked for me is removing the react-redux dependency of my own project.
npm un react-redux npm i react-native-offline
This way you make sure there’s only one version of react-redux.
Thank you for this answer. This works but in my opinion this is not error safe for future development of the app. I fixed versions of packages to
I had react-redux in version
7.1.0previously but offline package kept installing it’s own version7.1.3then I’ve added this version to whole app. If I wouldn’t freeze react-native-offline version I assume it would update it’s dependencies in future updates and crash the app again.Noticed a similar problem, solved it with @VincentCATILLON solution + made sure that my package.json had the same version.
@rgommezz Yup, react-redux v5 was causing the problem. Got up and running with v6.
@gams95 Yes, I have used the “createSwitchNavigator” to initiate my App.
@rgommezz I have the same error too.