| > No more having to spend time naming one-off elements Doesn't this make them untargetable if you ever use it somewhere else? Plus, it already has a CSS name: whatever you named the component (and therefore its folder). UI code should be modular, component-based, and lends itself to being logically grouped into single folders or files: MyComponent
->index.tsx
->style.css Or for vue just MyComponent, etc. Now, this component has all the abilities that we tap into these frameworks for in the first place: it's composable, it's targetable by a known & unique name, we can use it anywhere without restriction. I don't even want to imagine a world where I render some component and it has no targetable name... Terrible for reuse |
What he means by naming one off elements is that within MyComponent there are multiple native elements that may need to be styled.