ReactDOM.render’s first argument should be .
Here’s the code
import React from ‘react’;
import ReactDOM from ‘react-dom’;
const green = ‘#39D1B4’;
const yellow = ‘#FFD712’;
class Toggle extends React.Component {
constructor(props){
super(props);
this.state = {color: green }
}
render() {
return (
<div style={{background: this.state.color}}>
Change my color
);
}
}
ReactDOM.render(){
render(){
}
}