News for hackers. Stuff that matters.
Re:CSS in JavaScript is like replacing a broken screwdriver ... by cmbsw on Monday September 11, 2017 @04:01PM (#15221782)
Styled components uses tagged template literals so they aren't just strings and are very flexible. This blog post is a great explanation http://mxstbr.blog/2016/11/styled-components-magic-explained.... For example

const Button = styled.button` font-weight: {props => props.active ? 'bold' : 'none'} `; <Button active > This will be bold </Button>

I've found it to be very handy.

Re:CSS in JavaScript is like replacing a broken screwdriver ... by choxi on Tuesday September 12, 2017 @06:36PM (#15233605)
Interesting. Totally possible that I just never learned the power of tagged template literals, I only tried styled-components for a couple weeks.