It’s managed in the component (just like any variable declared in a function). The difference is while a “normal” variable “disappears” when their function exits, the state variables are preserved by React.
Read moreHow is React state stored?
React components have a built-in state object. The state is encapsulated data where you store assets that are persistent between component renderings . The state is just a fancy term for a JavaScript data structure.26 Kas 2020
Read more