How do you add a CSS class to an existing REACT element on click?
I have a JSFiddle created: https://jsfiddle.net/5r25psub/
In the fiddle, the code only wor
You can use the module classnames found here:
classnames
https://www.npmjs.com/package/classnames
So you would do something like:
getClassNames() { return classNames({ 'blue': this.state.clicked, 'green': !this.state.clicked }); }, render () { return }