too many useState's
Opened this issue · 2 comments
Deleted user commented
it might be better alternative to create a new hook useAppState
based on useReducer
and
useEffect
, and use this to create the app wrapper.
patrick-emmanuel commented
I think we can take it a step further with useContext
to make the state more composable.
Deleted user commented
Good idea! And while you're at it, focus on the shape of your state to make it as efficient and extensible as possible.