4 ms·
You don't have to use React and JS to get components. You can still get components with server or build time rendered HTML. About the only time you can't is if
by city41 6y ago
You don't have to use React and JS to get components. You can still get components with server or build time rendered HTML. About the only time you can't is if you are writing html and css files by hand. If you have some kind of css preprocessing going on, you can still get there with Tailwind's @apply with hand written html.
Whether components are a good thing in this particular context is debatable. But you can create them without JS.
- expliced 6y agoWhat templating library do you use that provides components? And no, partials are not a substitution.
- Kyro38 6y agoStencil to build WebComponents ?
- city41 6y agoWhy aren't partials a substitution in the context of Tailwind? The only goal is to keep classes DRY.
- dsego 6y agoYou can do server-side JSX I believe. Almost all front-end frameworks (eg Vue, Svelte, Riot) support SSR but you have to use JS on the server. Why PHP/Python haven't caught on and reworked their template syntax to look like nestable tag components with props is beyond me. Maybe an idea for a new open-source lib, JSX for PHP?