from Hacker News

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

by Pistos2 on 10/30/19, 3:57 PM with 0 comments

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).