2 ms·
That's exactly what the setter function returned by useState does, it sets the value returned the next time the corresponding useState is run for the same compo
by dragonwriter 5y ago
That's exactly what the setter function returned by useState does, it sets the value returned the next time the corresponding useState is run for the same component (it is order based, which is why hooks must be run in a constant order.)