Created
November 20, 2020 14:13
-
-
Save GuilhermeLis/a7b35a73ef8f874efa740d2e6f522dcb to your computer and use it in GitHub Desktop.
persistReducers from Redux with AsyncStorage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AsyncStorage from '@react-native-async-storage/async-storage'; | |
import { persistReducer } from 'redux-persist'; | |
export default (reducers: any) => { | |
const persistedReducer = persistReducer( | |
{ | |
key: 'redux-with-asyncstorage', | |
storage: AsyncStorage, | |
blacklist: [], | |
}, | |
reducers, | |
); | |
return persistedReducer; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment