Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Custom redux persist version for redux-offline
import { createStore, applyMiddleware } from 'redux';
import storage from 'redux-persist/lib/storage'
import { composeWithDevTools } from 'redux-devtools-extension';
import { persistStore, persistReducer } from 'redux-persist';
import thunk from 'redux-thunk';
import reducer from 'reducers';
import { createOffline } from '@redux-offline/redux-offline';
import offlineConfig from '@redux-offline/redux-offline/lib/defaults/index';
const persistConfig = {
key: 'root',
const {
middleware: offlineMiddleware,
enhanceReducer: offlineEnhanceReducer,
enhanceStore: offlineEnhanceStore
} = createOffline({
persist: false
const persistedReducer = persistReducer(
export default function configureStore() {
const store = createStore(
applyMiddleware(thunk, offlineMiddleware)
const persistor = persistStore(store);
return { persistor, store };

This comment has been minimized.

Copy link

vallimaiel commented Feb 28, 2019

i too came up with the same issue but even if i remove redux persist ,the crash appears to continue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.