4 ms·
I was asking because doing this just looks like normal CSS, where you define a class and use it in multiple places, only that it's in JS instead, so you still h
by XCSme 7y ago
I was asking because doing this just looks like normal CSS, where you define a class and use it in multiple places, only that it's in JS instead, so you still have all the "problems" mentioned in the article.
- Izkata 7y agoThe major downside of reused inline CSS is when you have to do minor tweaks (where active manipulation in the browser devtools is by far easier to find the right values) and those inline styles are on the page multiple times. Editing one class's rules is significantly easier than all the repeated inline styles.
- 0xFACEFEED 7y agoWith the inline CSS approach, components are your reusable entities not CSS classes.
- koboll 7y ago>where you define a class and use it in multiple places If you're doing this in React, you should probably be reusing a component.