I am wondering where React store value of useState. SO lets say that we have
function counter() {
const [count, setCount] = useState(0)
return (<div className="counter">{count}</div>)
}
this component will return something like this:
{ type: 'div', props: { className: 'counter', children: null, etc... } }
So now I am not sure where count reference/value is located. Is is stored together with this component or it is separated from it?