3 ms·
They literally don't. For some reason the developers think that storing state in hidden global variables (linked list indexed by hook call order) is a good idea
by imtringued 5y ago
They literally don't. For some reason the developers think that storing state in hidden global variables (linked list indexed by hook call order) is a good idea. You know, they could have at least defined useReducer inside the class. Of course that would sort of break the pretentious ability to define hooks as global functions that access component state. After all, you would have to pass the current component as the first parameter, imagine the horror!