3 ms·
> You need a ton of classes to essentially replicate inline styles. This works better for optimization because you reuse classes. End developer doesn't care. D
by csomar 2y ago
> You need a ton of classes to essentially replicate inline styles.
This works better for optimization because you reuse classes. End developer doesn't care. Designers use Storybook to keep track of the components.
> But arguing this is better than sending an HTML tag with a couple of classes is absurd.
If you compile/SSR your React, the end user will get an HTML tag with classes.
- wruza 2y agoIs this specific to react?
- xigoi 2y ago> If you compile/SSR your React, the end user will get an HTML tag with classes. Isn’t that just semantic HTML with extra steps?
- pier25 2y agoWith Bulma/Bootstrap you're also reusing classes but you just need a fracion of those compared to TW. I don't know the ratio but I would imagine it's something like 1:10. And when using TW with SSR you're still sending all those extra classes per element.