-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for middleware #35
Comments
What do you envision the API looking like? fwiw I currently build a middleware system on top of the API that already exists |
3rd arg and or partial application useReducer(middleware)(state, cb => {}) this breaks direct compat tho or useReducer(state, cb, middleware) middleware being an array that gets run through dequentially being passed the subsequent state and returning either state or next(state) since you have obviously have experience would love to hear your ideas |
That makes sense...seems good to me! The API changes that were made in #14 (aka #19 ) and #9 should make that API possible, I think. Also, if it's useful this is the pattern I currently use: https://gist.github.com/jamesplease/ab7207cfd0f3aaf3ffd9990f8f4c8bed |
nice, definitely useful and . similar to my brain thoughts, thanks for the commentts |
in a perfect world it could support redux middleware
The text was updated successfully, but these errors were encountered: