Re:Hooks are the best thing to happen to React
by dragonwriter on Saturday October 23, 2021 @12:48PM
(#28970131)
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.)
[ Parent
| on HN ]
There are no comments on this comment yet.