ReactDOM

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(){

}

}

Hello! In order to help you with that ReactJS problem, you should post the URL to the exercise, explanation of the error message and also read this topic about formatting your code.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.