Guest User

Untitled

a guest
Apr 20th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. import {compose, createStore} from 'redux';
  2. import rootReducer from './reducers'
  3. import persistState from 'redux-localstorage' // +1 line
  4.  
  5. const persistedSlices = ['auth', 'constants', 'myStuff']
  6.  
  7. const enhancer = compose(
  8. /* [other middlewares] */,
  9. persistState(persistedSclices), // +1 line
  10. )
  11.  
  12. const initalState = {}
  13.  
  14. const store = createStore(rootReducer, initialState, enhancer)
Add Comment
Please, Sign In to add comment