1- Break The UI Into A Component Hierarchy
2- Build A Static Version in React
3-Identify Representation Of UI State
4-Identify Where Your State Should Live
5-Add Inverse Data Flow
a component should ideally only do one thing. If it ends up growing, it should be decomposed into smaller subcomponents.
## What does it mean to build a ‘static’ version of your application?
has no interactivity( building a static version requires a lot of typing and no thinking, and adding interactivity requires a lot of thinking and not a lot of typing.)
Add the Data Flow ( support data flowing the other way)
## What are the three questions you can ask to determine if something is state?
Is it passed in from a parent via props? If so, it probably isn’t state.
Does it remain unchanged over time?
If so, it probably isn’t state.
Can you compute it based on any other state or props in your component? If so, it isn’t state.
1- Identify every component that renders something based on that state. 2- Find a common owner component
Functional components React Hooks