Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
key: 'elegant',
storage: AsyncStorage,
whitelist: ['user', 'todos', 'app'],
};
const persistedReducers = persistReducer(persistConfig, rootReducers);
const defaultMiddlewareConfig = {
serializableCheck: {
ignoredActions: ['persist/PERSIST'],
},
};
const middleware = [
sagaMiddleware,
...getDefaultMiddleware(defaultMiddlewareConfig),
logger,
];
const store = configureStore({
reducer: persistedReducers,
middleware,
devTools: process.env.NODE_ENV !== 'production',
});
sagaMiddleware.run(rootSaga);
const persistor = persistStore(store);
export {store, persistor};