by mbgerring · 5y ago · 0 comments
I have been waiting for a long time for the framework that will let me write a web component, and then include that web component in a regular HTML page, in a way that’s supported by the idioms and best practices of that framework.
It’s also worth pointing out that all of these drawbacks to rendering web pages on the front end via JavaScript were obvious the moment these frameworks were introduced. The critics at the time were right. But we still lack for easy-to-use alternatives.
And I’m sure the same can be done in other frameworks.
Facebook did just that with React. React doesn't have to be used only as a single page app. Use it for just a single component on a page if you want.
You're right that tooling/tutorials are mostly geared towards SPA usage, but React itself is designed to work for both. You'll have to decide on a pattern for "bootstrapping" React in a given page or element, since there aren't well-established best practices, but after that it's smooth sailing.
But then your framework wouldn't replicate itself with the prolific genius of Genghis Khan or the coronavirus.