When I add redux-thunk to my react native project, my redux remote devtools does not hold any state. The state says undefined in the remote devtools window. Previously (devtools working):
const store = createStore(
reducer,
initialState,
devToolsEnhancer()
)
Change to (devtools stopped working):
const store = createStore(
reducer,
initialState,
applyMiddleware(thunk),
devToolsEnhancer()
)
Am I doing the wrong order in createStore
?
Update: I think composeEnhancers
is needed. Tried a few variations of this but not working:
const store = createStore(
reducer,
initialState,
composeEnhancers(applyMiddleware(thunk)),
devToolsEnhancer()
)