(no title)
adwww | 3 years ago
Like, I thought we were supposed to keep our content and styles separate, not mismatch them all together with a thousand utility class imports.
adwww | 3 years ago
Like, I thought we were supposed to keep our content and styles separate, not mismatch them all together with a thousand utility class imports.
atsjie|3 years ago
Basically it's a component-mindset; create some file with everything in it so that in the rest of the app you can just use `<MyButton>...</MyButton>`.
The `<MyButton />` file takes responsibility for everything it does (logic, handlers, markup, style).
However; this does not mean these files should grow large. Instead when things become too big (say over 250 LoC) you split up responsibilities by sub-components.
It's basically dividing problems in ever-smaller problems, but NOT by separating by technology (html/css/js).
Separation of concerns is horizontal slicing of the app architecture, components however slice the architecture vertically.
unknown|3 years ago
[deleted]
naasking|3 years ago