Executing this following piece of code:
function Events (props){
const clickHandler = console.log;
return (<button onClick={clickHandler}> Make an event </button>);
}
ReactDOM.render(<Events />, mountNode);
I get this error: Converting circular structure to JSON at JSON.stringify (<anonymous>)
The code is from a pluralsight ReactJS course and when the guy who is presenting the course executes the code, he gets the event triggering object printed in the console, while I get this error.