Settings

Theme

Ask HN: If global variables are bad, why are JavaScript data stores okay?

1 points by Pistos2 6 years ago · 0 comments · 1 min read


By "stores" I mean things like Redux, Vuex, ngRx.

I've been using Vuex for a while now, and haven't had any major problems (yet), so, instinctively, based on experience, I feel like these centralized data stores are okay. Yet, I don't think I could make a solid, detailed argument in their favour given the reasons why global variables are bad (e.g. globals increase coupling; globals increase number of potential culprits when debugging).

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection