Redux store does not have a valid reducer

You have searched all on Stackoverflow. It didn’t help any.

Here is why:

Put Provider at the top-level component.

If you structure your component like this on your App.js:

return(
<SafeAreaView>
<Provider store={createStore(reducers)}>
</Provider>
</SafeAreaView>
);

You will get an error: Redux store does not have a vlid reducer.

Instead,

return(
<Provider store={createStore(reducers)}>
<SafeAreaView>
</SafeAreaView>
</Provider>

Keep Provider at top level component.

Written by

Don’t follow me. I wrote junks here. Follow me on Twitter instead.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store