Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

Commit

Permalink
feat: remove redux-persist from project
Browse files Browse the repository at this point in the history
feat: remove redux-persist from project
  • Loading branch information
Metnew committed Oct 30, 2017
1 parent 07b584b commit 86d781e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 8 deletions.
3 changes: 0 additions & 3 deletions src/client/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import 'isomorphic-fetch'
// Application
import {hydrate} from 'react-dom'
import {configureApp, configureRootComponent} from 'common/app'
import {persistStore} from 'redux-persist'
import type {GlobalState} from 'reducers'
import type {i18nConfigObject} from 'types'

Expand All @@ -52,8 +51,6 @@ const RootComponent = configureRootComponent({

hydrate(RootComponent, document.getElementById('app'))

persistStore(store)

if (module.hot) {
module.hot.accept()
}
1 change: 0 additions & 1 deletion src/common/api/LocalStorageCookiesSvc/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @flow
import Cookies from 'js-cookie'
// By default, we don't use localStorage, but store2 is already installed
// But we use redux-persist (syncs localStorage with redux state)
// import store from 'store2'
import decodeJWT from 'jwt-decode'

Expand Down
5 changes: 1 addition & 4 deletions src/common/app/configure_app.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
// @flow
// Redux stuff
import thunk from 'redux-thunk'
import {autoRehydrate} from 'redux-persist'
import {createStore, applyMiddleware, compose} from 'redux'
import {routerMiddleware} from 'react-router-redux'
// // Application
Expand All @@ -14,10 +13,8 @@ import {history, routes} from 'routing'
* @return {Object} - configured store
*/
const configureStore = (initialState: Object) => {
const rehydrate = autoRehydrate()
const middlewares = [thunk, routerMiddleware(history)]
const appliedMiddlewares = middlewares.map(a => applyMiddleware(a))
const enhancers = [rehydrate].concat(appliedMiddlewares)
const enhancers = middlewares.map(a => applyMiddleware(a))

const getComposeFunc = () => {
if (process.env.NODE_ENV === 'development') {
Expand Down

0 comments on commit 86d781e

Please sign in to comment.