3 ms·
> React, Vue, Svelte. They all put components at the core. Scoped logic. Scoped templates. Scoped state. Then we hand them a stylesheet that’s global, cascading
by amadeuspagel 1y ago
> React, Vue, Svelte. They all put components at the core. Scoped logic. Scoped templates. Scoped state. Then we hand them a stylesheet that’s global, cascading, and inherited by default.
I don't know about react and vue, but svelte has a style tag that's scoped to the component.
- fkyoureadthedoc 1y agoVue has had scoped css for a decade. I was very pleased moving to Vue from zope templates and jQuery spaghetti.
- alternatex 1y agoAll of them have both global and component-scope styles. Not having that flexibility would make a UI framework not viable for modern web dev. Just like with any code, you want to scope as much as possible, but an escape hatch is essential to avoid hacks for those edge cases.