Skip to content

Instantly share code, notes, and snippets.

@AllGistsEqual
Created May 2, 2021 19:28
Show Gist options
  • Save AllGistsEqual/5483ade79e70a4401cbf7cc89b59c929 to your computer and use it in GitHub Desktop.
Save AllGistsEqual/5483ade79e70a4401cbf7cc89b59c929 to your computer and use it in GitHub Desktop.
// File: src/redux/index.ts (partial 1)
import { persistStore, persistReducer } from 'redux-persist'
import AsyncStorage from '@react-native-async-storage/async-storage'
const persistConfig = {
key: 'root',
storage: AsyncStorage,
whitelist: ['user'],
}
const persistedReducer = persistReducer(persistConfig, rootReducer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment