Closed calebmer closed 8 years ago
Thank you!
1.0.0
. I am not sure about applySideEffects
though. applyMiddleware
is a good name even for store enhancer because it actually takes middleware list as an argument on the other hand applySideEffects
does not take any arguments (hypothetically it does not apply anything) therefore I am a bit worried about some confusion. I checked all the store enhancers listed in redux ecosystem page yet I didn't find any pattern in naming. But many people simply use default export
for the enhancer, maybe this is the way to go...AppStateWithEffects
, can you please extend?redux-promise
is doing so the actual dispatch chain would return a promise (no matter whether any promise was provided).As for 2 and 3 I'll put together some code as a discussion peice.
Closing in favor of next
I really like the direction this module takes to side effects in redux, and I've been exploring its usages in an isomorphic progressively enhanced web app. However, there are a couple of things which I have questions on/would like to see changed. I am willing to write a PR for all these things if you would like.
createEffectCapableStore
toapplySideEffects
or something like that (this is just a preference thing so it is more inline with the ReduxapplyMiddleware
).redux-thunk
middleware to accomplish the current functionality, but I think that's desired for most redux developers.setImmediate
instead of executing the effects on the next dispatch. I'm not sure why effects are executed in the next dispatch currently. This change would eliminate the need forAppStateWithEffects
and for wrapping thedispatch
function. This change would also have the benefit of making the module's surface area less.Promise.all(…)
on later.I really love this module, I love the approach it's taking, I live the literature surrounding it, and I am really excited for what it could mean in the progressive enhancement community. These are just a couple suggestions/challenges/questions (call it what you want ☺️) I had while exploring the source code.