One of the basics of the Object-Oriented programming is Encapsulation, which aims to never let our domain models enter an invalid state. Think about the peace of mind when persisting data or using it for any processing, if you can be absolutely sure ...

Markdown supported Β· ββ΅ to post
Very well written article with good examples. Thanks for explaining these concepts π
Aleksa
Aficionado of tech π» π
Great article, however, I don't think encapsulation is always the solution. Having lots of classes in React/Vue basically nullifies treeshaking, and unused parts of the classes will be bundled up in parts of the code where they are not actually used.
From frontend-only perspective, it is way more performant and intuitive to write hooks/composition functions instead, whether or not you use TS.