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