You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's need to add constant for each action name and define separately actions and reducers. In reducers you often need to use switches and each reducer should be able to handle all actions (to return state unchanged for an unknown actions). This leads to unnecessary boilerplate, code duplication and will slowdown reducer stage for complex states.
What is the expected behavior?
It's possible to define state changes once and generate from this single source of truth both actions and reducers fully compatible with current Redux ecosystem. For example of this approach you can see my attempt to improve this situation:
Agreed. This isn't actually a specific "feature" request, either, as it doesn't suggest any actual changes to Redux, but rather just points to an addon library.
Do you want to request a feature or report a bug?
Feature
What is the current behavior?
It's need to add constant for each action name and define separately actions and reducers. In reducers you often need to use switches and each reducer should be able to handle all actions (to return state unchanged for an unknown actions). This leads to unnecessary boilerplate, code duplication and will slowdown reducer stage for complex states.
What is the expected behavior?
It's possible to define state
changes
once and generate from this single source of truth both actions and reducers fully compatible with current Redux ecosystem. For example of this approach you can see my attempt to improve this situation:https://github.com/dogada/edux
For every action it has O(1) speed instead of Redux's O(N) where N is number of reducers.
The text was updated successfully, but these errors were encountered: