Commit a3d5b009 authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg

Add persist state middleware

parent 2bac5412
......@@ -4,14 +4,14 @@ import React from 'react'
import ReactDOM from 'react-dom'
import { combineReducers, createStore, applyMiddleware, compose } from 'redux'
import { Provider } from 'react-redux'
// import promiseMiddleware from 'redux-promise';
import persistState from 'redux-localstorage'
import thunk from 'redux-thunk'
// import { connectRoutes } from 'redux-first-router'
// import createHistory from 'history/createBrowserHistory'
import reducers from './reducers/'
import App from './containers/App'
import API from './utils/API'
import logger from './middleware/logger'
// import { routesMap, options } from './routesMap'
......@@ -29,6 +29,7 @@ import './css/style.css'
let store = createStore(
reducers,
compose(
persistState(),
applyMiddleware(
thunk,
logger
......@@ -59,6 +60,8 @@ let store = createStore(
ReactDOM.render((
<Provider store={store}>
<App />
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment