state colocation

Keeping state as close as possible to the components that use it, rather than high up in the tree or in global storage.

In more detail

Colocated state is easier to understand and re-renders fewer components when it changes. Lift it only when siblings genuinely need to share it.

Related terms

Taught in

References