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
Currently, we are using useState hook to manage the user selection state based on the radio button clicked. The currently logic is using some hard coded values like beginner etc. It will be better to use the useReducer hook to handle the logic because the state is complex. Another advantage of the useReducer hook is that we can dispatch a payload that can be used to replace the hard coded values in the searchForm component.
The text was updated successfully, but these errors were encountered:
Replace useReducer
Currently, we are using
useState
hook to manage the user selection state based on the radio button clicked. The currently logic is using some hard coded values likebeginner
etc. It will be better to use theuseReducer
hook to handle the logic because the state is complex. Another advantage of theuseReducer
hook is that we can dispatch a payload that can be used to replace the hard coded values in thesearchForm
component.The text was updated successfully, but these errors were encountered: