conditional css class styling
class App extends Component {
constructor() {
super()
this.state = { isRed: true }
}
render() {
const isRed = this.state.isRed
return <p className={isRed ? 'class1' : 'class2'}>Example Text</p>
}
}