2 ms·
The big problem with traditional global variables is the way any code can change them arbitrarily, making it near impossible to understand the state management
by Silhouette 6y ago
The big problem with traditional global variables is the way any code can change them arbitrarily, making it near impossible to understand the state management in a large program. I would argue that a library like Redux on the front end is more like a database, in that while it can be accessed from anywhere, in reality there is a structure to interacting with it and there has to be an explicit intention to modify the current state, which can been found via tools or even just a grep of the source code.