Open qntnrbns opened 7 years ago
that is a good point. IIRC there was some confusion because code often depends on the return values of thunks, which action buffer destroys. I think the next version should actually return promises that resolve to the original value. Still it is I think a risky paradigm because it introduces uncertainty about how thunks work.
True, that is a good suggestion for an update. I could take that on in the near future if you want.
In your documentation, you suggest that the user place the middleware returned
createActionBuffer
after the thunk middleware. Your code does not actually necessitate this, and there are use cases where you may want to delay thunks before state is loaded: for example, if you need data from the stored state to make a network request.