Curiosity is an amazing way to learn! Most of our users are on low end hardware, slow CPU, slow ssd disk, etc. The more you use React or any JS UI Library, the larger the bundle size becomes. The larger the bundle the slower it takes to download, js construction, js instantiation, and js evaluation.
One of the major design flaws in React and other UI libraries is JSX. Rendering HTML in JS brings in so much bloat to the bundle making the entire boot up process slower.
A better way doing this would be:
- HTML parser for rendering the UIs (blink)
- CSS parser for styling the UIs (blink)
- JS for the application logic (v8)
That is how the web works today, each module is responsible, and highly optimized to do that work. Instead of letting JS do all that for you, which was never the intent. Let JS just add the interactivity (event handlers) like how island’s architecture is done through Web Component, and you will get a speed boost.
UI Frameworks like LitElement and FastElement which are based on Web Components is a great way getting that perf startup boost since it ships less JS. Using those with Declarative Shadow DOM makes your UI more resuamable and super fast since UI code doesn’t have to exist in JS at all.