4 ms·
I don't like the way they write styles: style: 'font-weight: normal; font-style: italic' instead of style: { fontWeight: "normal", fontStyle: "italic
by amelius 10y ago
I don't like the way they write styles:
style: 'font-weight: normal; font-style: italic'
instead of
style: { fontWeight: "normal", fontStyle: "italic" }
I mean, it requires stringization and string-concatenation overhead.
- rictic 10y agoIf you're doing inline styles, the former is how the style is expressed to the style engine isn't it? i.e. <div style="font-weight: normal; font-style: italic">
- ojr 10y agoin react, styles can be just another variable in the component model/props <div style={{ fontWeight: 'normal', fontStyle: 'italic' }}/>