Relative Content

Tag Archive for globals

Global variables in javascript

I don’t consider myself a highly skilled javascript developer, but I thought I got one thing right for sure: don’t create global variables unless you really have to.

Doesn’t an event bus affect global state?

“Minimize mutable global state” is a more or less accepted program design principle. The reason often cited is that having global state can affect two components that don’t are seemingly unrelated. In other words, a component mutating global state would have no idea who else it is effecting since it doesn’t know what other component has a dependency on that global state.