-
Notifications
You must be signed in to change notification settings - Fork 862
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
_this.store.getState is not a function #85
Comments
import createStore from './redux/configureStore'
import {persistStore} from 'redux-persist'
const store = createStore()
const persistor = persistStore(store, {storage: AsyncStorage})
|
Great! Would I pass down the
|
One more thing, Is it possible to pass a persisted store down to my child the <Provider component? The following
|
no need to pass persistor to provider. I would recommend reading up more on how react-redux works. Basically if you want access to state you use should using |
I'm having trouble setting up redux-persist. I keep getting an error -
_this.store.getState is not a function
I have no idea why it's not working, I also found that their weren't any examples! If I get this running I'll try put up an example for other users.
This is my configureStore.js file
And here is where I'm passing the store down to the
<provider>
componentAlso a question I have:
Is it possible for me to only persist an array of reducers? I've got about 10 reducers, and I'd only like to persist 2 or 3 of them to
AsyncStorage
?The text was updated successfully, but these errors were encountered: