Proposal to Transition everything from Redux Toolkit to useReducer #86
chavi362
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello team,
I hope this message finds you well. I am writing to propose a transition from using Redux Toolkit to utilizing the useReducer hook in our virtual-keyboard component.
Current Setup:
As of now, we have integrated Redux Toolkit to manage a single action, which is to add color to one of the keyboard buttons when it is clicked, either in the virtual keyboard or on the physical keyboard. The majority of the state is handled by UseReducer within the virtual keyboard component.
Proposal:
I suggest we transition also the add color to use the useReducer hook instead of relying on Redux Toolkit. The virtual-keyboard component is relatively small, and for components with straightforward state management needs, useReducer can offer a more direct and concise solution. This change would involve refactoring our current implementation to utilize the useReducer hook, and the state data would be delivered to the components as props.
So, if you want to pick this issue, please change also the add-color function to the useReducer in the virtual keyboard component
If there are concerns or if anyone believes that Redux Toolkit is a more suitable choice for our specific use case, I am open to discussion. Please share your thoughts, and we can collectively decide whether to proceed with transitioning everything to useReducer or to maintain the current Redux Toolkit implementation.
I appreciate your time and consideration on this matter.
Chavi
Beta Was this translation helpful? Give feedback.
All reactions