This is a very detailed question but im wondering...
let [state, updateState] = useState()
that piece of code returns an initial state, but when we use updateState, how does react actually go into our code and change that "state" ,which is an already updated value? How do they have access to our code to change it like that?