3 ms·
JSX components (.tsx) are rendered server-side, it's all just GET/POST with optional HTMX
by joseferben 2y ago
JSX components (.tsx) are rendered server-side, it's all just GET/POST with optional HTMX
- meiraleal 2y agoSo the frontend is built in the server on every request. That's the opposite of not having a frontend build process
- joseferben 2y agostrictly speaking there is a simple build process on the server since plainweb uses node + tsx (the esbuild wrapper, not the markup) instead of something like bun or deno that supports typescript natively. plainweb avoids build processes that bundle js that runs in the browser.
- meiraleal 2y agoAlright. I don't think it is the smartest engineering to avoids "building js" by "building html from js". But good luck with that!
- langcss 2y agoIf Node is your backend then JS is what you need to use. Whether directly or via Typescript. JS is just the language. Avoiding JS on the front end is more about avoiding front end code, state management, mutations, a11y issues, frameworks etc. rather than the JS language itself!
- meiraleal 2y agoIt also means avoiding using available tools in a well tested OS that is a browser like service workers, WebRTC, etc. Not knowing how to use them efficiently isn't a feature.
- langcss 2y agoIt is a developer time tradeoff. If your app is mainly forms and not that interactive a framework like this would be OK. Internal crud tools would be an example. But you can’t use it for everything (you can’t use any framework for everything!)