-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
useReducer middleware #164
Comments
An interesting hook would be that allows to add any Redux middleware. const useMyReducer = applyMiddleware(useReducer, [logging, thunks, ...]); |
I have created a Also, there are already a few repositories that have been doing Redux things with hooks ( |
I noticed that In order to fix this we need a |
🎉 This issue has been resolved in version 9.4.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Extend the standard
useReducer
with a dispatcher that can handle "thunks" similar toredux-thunk
. It could look something like this:Something similar was described in this article: https://medium.com/yld-engineering-blog/rolling-your-own-redux-with-react-hooks-and-context-bbeea18b1253
The text was updated successfully, but these errors were encountered: