9 ms·
Sorry just realised my question wasn't clear at all By usual way I mean using inline styles the React way i.e. style={_componentStyle}
by ioseph 10y ago
Sorry just realised my question wasn't clear at all
By usual way I mean using inline styles the React way i.e. style={_componentStyle}
- mxstbr 10y agoThe huge downside with inline styles is that they don't support all of CSS _at all_. You have to reimplement basic things like pseudo selectors (hover/active/focussed/… styles) and things like pseudo elements, media queries, keyframes are non-existant. On top of that, for the eventual global style you need (e.g. @font-face) you now have to add a separate build step for actual CSS to add that. We have a language on the web that's made for styling. It has support for all those things by default. It's called CSS. Why not use it?