component state

Data a component remembers between renders, such as typed text or whether a menu is open; changing it makes React render again.

In more detail

You create state with useState or useReducer and change it only through the setter those hooks return. React stores the value on the component Fiber, not in the function, so it survives each new call of the component. State is private to the component instance and can be passed to children as props.

Related terms

Taught in

References