State Initializer Stability
The point is initial value should not change after you make a state change from outside the component.
This is what initial state means.
So them you make a useRef state current as default in the useToggle hook, and It never changes.
See the difference in the starting committe.
Does NOT matter if you click in the button to change the states it will NOT change because the initial state is stable and never changes.
Unless if you change the key it will change because it will re-render the component and the initial state will be re-evaluated.