Trouble using enhancers router, thunk
Opened this issue · 2 comments
cramatt commented
I have gotten this to work at a basic level. But, after I add router and thunk enhancers, I get the following error:
inputState.withMutations is not a function
TypeError: inputState.withMutations is not a function
Here is roughly my store:
const reducer = asyncInitialState.outerReducer(rootReducer);
const initialState = compose(applyMiddleware(asyncInitialState.middleware(loadStore.bind(null, storeUrl))));
const enhancer = composeEnhancers(applyMiddleware(thunk, router));
return createStore(
reducer,
initialState,
enhancer
);
cramatt commented
Looks like the issues stems from using redux-immutable
, which expects initial state to be instance of Immutable, so in this libraries case we return a Promise which results in error.