Closed moimael closed 7 years ago
Ok so the middleware needs to be modified to work with redux-thunk. I added
if (typeof action === 'function') {
return action(store.dispatch, store.getState);
}
But I'm not sure I the revert/commit stuff still works by doing this. It would be awesome to have an example of the middleware modified to work with thunk in the documentation :)
is your thunk middleware running before the middleware you write for this?
Ah no it wasn't, it seems to work now. Thanks !
Hi,
I'm implementing redux-optimistic-ui in our webapp and it works well for most cases. But I noticed that when I try to use it with a thunk instead of a classic action, nothing happens. Any pointers ?
Thanks !