4 ms·
I would say that the JS world is moving towards pub/sub but I understand what you mean about causality. I think the change that's happening is that devs are mo
by jondubois 11y ago
I would say that the JS world is moving towards pub/sub but I understand what you mean about causality.
I think the change that's happening is that devs are moving towards using a central shared store for all data (one source of truth) instead of making each component load/save data independently from each other.
- bcherny 11y agoI'm not sure that's a trend, but a peculiarity of Redux/Baobab. Without built in immutable data structures, I think this kind of paradigm will always be harder to work with in JS than smaller, distributed, mutable models.
- chc 11y agoIt's also one of the big ideas of Om, which I think is where it started catching on from.
- EvanPlaice 11y agoOr, you know... You could just use immutable.js. It's not like OOP languages where the built-in data structures are built up from many layers of inheritance that all have to be made immutable. Where access is blocked at the language level (ex private/protected). Immutabilit is not difficult in JS. It's just not immetiately intuitive unless you understand the value of comparison by reference. The == vs === always seemed like a strange vestigial appendage of JS. With the recent trends, it's beginning to make a lot more sense.