4 ms·
I've found styled-components to solve just about all my gripes about CSS in React. You even get auto formatting with Prettier. https://www.styled-components.co
by cageface 8y ago
I've found styled-components to solve just about all my gripes about CSS in React. You even get auto formatting with Prettier.
https://www.styled-components.com https://www.styled-components.com
- molszanski 8y agoWhat are your gripes?
- cageface 8y agoI’ve found doing CSS in JS to be a bit awkward. The fancier CSS grid syntax is a good example of CSS that’s awkward to write in JSON. styled-components lets me use normal CSS syntax in a natural way alongside JSX code.
- molszanski 8y agoWhat "CSS in JS" you where using before? JSS?
- cageface 8y agoMainly I was just using react’s native support for passing styles as JSON objects.
- molszanski 8y agoOh. Now I understand. Yeah, that makes a lot of sense.