Re:Global variables are bad (2013)
by darekkay on Thursday July 26, 2018 @03:54AM
(#17615808)
This is how Redux (Flux implementation) in JavaScript works. Basically the whole application state is maintained in a single, global variable. Also, every possible action has a global string ID constant.
Coming from Java and its best practices it seemed really odd at first, but it makes state management and debugging so much easier.
Coming from Java and its best practices it seemed really odd at first, but it makes state management and debugging so much easier.