import AsyncStorage from '@react-native-community/async-storage' ; import { persistCombineReducers } from 'redux-persist' ; import { allFilmsReducer } from '@redux/ghibli/reducers' ; const reducers = { films : allFilmsReducer , } ; const persistConfig = { key : 'root' , storage : AsyncStorage , timeout : undefined , whitelist : [ 'onBoard' ] , } ; export const persistedRootReducer = persistCombineReducers ( persistConfig , reducers ) ; export type RootState = ReturnType < typeof persistedRootReducer > ; export default persistedRootReducer ;