Stack your classes within template literals

`All
day
breakfast`
'All\
day\
breakfast'
// or'All' +
'day' +
'breakfast'
const friend = 'Chris Nager'console.log(`Hello, ${friend}.`)// Hello, Chris Nager.
import React, {
Component,
} from 'react'
class Box extends Component {
render() {
const {
color,
isActive,
} = this.props
return (
<div className={`
h1
p2
border
italic
${color}
${isActive && 'bold'}
`}
>
{color}
</div>
)
}
}
React.render(
<Box
color="teal"
isActive
/>,
document.body
)
$ git diff   return (
<div className={`
h1
- p2
+ p3

border
italic
${color}

--

--

Senior software developer @airhq / formerly @iex and @salesforce

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Chris Nager

Chris Nager

Senior software developer @airhq / formerly @iex and @salesforce