Are your components complex with too many states and props?. It is time to use UseReducer and UseContext hooks now to simplify them and keep them clean.
In this article, we will see how to use useReducer and useContext hooks together with typescript in a step-by-step guide. If you are not familiar with useReducer and useContext, have read through in ReactJS site
What is useReducer?. https://reactjs.org/docs/hooks-reference.html#usereducer
What is useContext?. https://reactjs.org/docs/hooks-reference.html#usecontext