patrick-emmanuel/starwars

too many useState's

Opened this issue · 2 comments

it might be better alternative to create a new hook useAppState based on useReducer and
useEffect, and use this to create the app wrapper.

I think we can take it a step further with useContext to make the state more composable.

Good idea! And while you're at it, focus on the shape of your state to make it as efficient and extensible as possible.