8 ms·
I think the real insight from this type of an approach and from the very popular single state atom architecture is that just having all state in one object make
by endergen 11y ago
I think the real insight from this type of an approach and from the very popular single state atom architecture is that just having all state in one object makes serialization trivial. Many projects end up doing crazy things like solving serialization in too many ways in the same code base, such as too local storage, REST based serialization/deserialization, and etc. You must take considerations to not have the issues globals typically introduce such as hard to mock testing environments and the usual globals as communication shenanigans, but there are ways to treat each code concerns as it's own relative path object within the larger global object.
Personally, I just think having a clean data protocol basically like a database in app space leads to much cleaner architectures, especially once you try to do offline first, data sync, and more advanced features like access models.