It's basically a boilerplate. In my "ideal" framework, the h1 element would be there in the HTML (maybe statically embedded, if the framework is really good). This could speed up a little bit
Why not use a function h1("Headline")? This would be even quicker as it create a DOM element without rendering HTML. And as it is a function, it can be part of any algorithm you want.
Can you clarify what you mean by this? I'm not sure I understand it.
Consider this component:
If you run this through Svelte, you get this HTML as output:
It's basically a boilerplate. In my "ideal" framework, the
h1
element would be there in the HTML (maybe statically embedded, if the framework is really good). This could speed up a little bitI see what you mean now - Something that outputs closer to Static Site Generators without being fully static 😊 That would be amazing!
Why not use a function h1("Headline")? This would be even quicker as it create a DOM element without rendering HTML. And as it is a function, it can be part of any algorithm you want.
Yep, it would! I'm actually building a prototype of something like this.
What about next.js?
It sounds interesting, but I haven't used it, so I can't say much.