|
|
|
|
|
by boredtofears
1033 days ago
|
|
It's not clear to me what you're describing is a "newer way of developing". Type safety and IDE autocompletion are nothing new - these are decades old concepts that are finally making their way to dynamic languages like javascript. Scoped CSS/JS isn't a unique concept to SPA's, you can absolutely implement the same thing in a page loading app. |
|
I know there are a handful of tools that can do this for server rendered templates, but they are very rare and very underutilised, and typically don't have the LSP/IDE support that JSX or single-file-components do.
I do not know any server-side templating languages that do scoped CSS, much less any sort of scoped JS. By that I mean, I can write a CSS declaration (in CSS syntax or otherwise) and guarantee that it will only be used in one place, scoped to a single component (or template partial). This means I'm no longer stuck with the global CSS namespace, and I can link my CSS files directly with the components that use them.