How to use the redux-starter-kit.getDefaultMiddleware function in redux-starter-kit

To help you get started, we’ve selected a few redux-starter-kit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github iran-react-community / elegant-react-native / app / store / index.js View on Github external
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};

redux-starter-kit

A simple set of tools to make using Redux easier

MIT
Latest version published 5 years ago

Package Health Score

78 / 100
Full package analysis