You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm trying to add persistState , but it's giving me this error:
TypeError: next is not a function
(anonymous function)
C:/Git-Projects/reacttr/node_modules/redux-localstorage/lib/persistState.js:70
67 | console.warn('Failed to retrieve initialize state from localStorage:', e);
68 | }
69 |
> 70 | var store = next(reducer, finalInitialState, enhancer);
71 | var slicerFn = slicer(paths);
72 |
73 | store.subscribe(function () {
View compiled
Here's my store.js file:
import {applyMiddleware, createStore} from 'redux';
import {composeWithDevTools} from 'redux-devtools-extension';
import ReduxLogger from 'redux-logger';
import thunk from 'redux-thunk';
import promise from 'redux-promise-middleware';
import reducer from '../reducers';
import persistState from 'redux-localstorage';
const middleware = applyMiddleware(persistState(), promise(), thunk, ReduxLogger);
const initialState = {
};
function getHeaderTooltip(headerName) {
return "sum(" + headerName.toString() + ")";
}
export default createStore(reducer, initialState, composeWithDevTools(middleware));
The text was updated successfully, but these errors were encountered:
Hi, I'm trying to add persistState , but it's giving me this error:
Here's my store.js file:
The text was updated successfully, but these errors were encountered: