redux-most
redux-most copied to clipboard
redux-thunk instead of actions
If used with redux-thunk
I got functions in stream instead of dispatched actions. Used same way as in docs with createStateStreamEnhancer
@goodmind Can you copy and paste your store setup code here for me to look at? After that, I'll try to replicate it and figure out what's going on.
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose
const middlewares = [
thunk,
]
const storeEnhancers = composeEnhancers(
createStateStreamEnhancer(epicMiddleware),
applyMiddleware(...middlewares)
)
const store = createStore(
combineReducers(reducers),
storeEnhancers,
)
@goodmind Alright, I'm pretty sure I know what the problem is. I'll try to work out a fix soon.
Sorry, I never really intended it to be used in tandem with redux-thunk, but I should be able to make it work.
@joshburgess btw it's just transition phase from thunks
@goodmind Sorry for the long wait. I'm looking into this again now, but still in the process of figuring out how to accomplish it. It involves changing the definition of createStateStreamEnhancer
to accept multiple middleware (just like applyMiddleware
works..... applyMiddleware
is really just an enhancer like anything else), but I'm running into some issues which I believe are due to both epics and thunks being of type function
, but I'm still trying to figure it out.
I'll have progress on it in a new branch called redux-thunk-compatibility
if you'd like to take a look and help out.