Comment by gessha
1 year ago
I’m currently learning frontend (vanilla JS and bootstrap) and client-side render the UI for some of my ideas.
From my understanding, modern frameworks(React) use both. Why would you limit yourself to just server-side? Isn’t there a trade off between server-side and client-side rendering?
My rule of thumb is to render HTML where the state lives.
When state lives on the server, usually in a database, leave your templating engine there and ship HTML.
When state only lives in the client, think temporary UI state or animations, that rendering needs to happen in the client.
At least for the kinda of sites and apps I build, that almost always means most of the rendering is done on the server and client rendering is so small in scope that I don't need more than plain old JS or a web component.
Thank you very much for your feedback! In short, it's about theories like SPA, SSR and others. There are different approaches to creating web applications with their pros and cons. This template language is simply an implementation of one of these ideas. You can make websites using PHP (working with WP and other similar things), and through frameworks that use SSR as a basis and others.