Lol.. class MyComponent extends React.Component { constructor() { super(); this.setState({ num: 0 }); } handleClick = () => this.setState({ num: this.state.num + 1}); render() { return ( ) } } class MyComponent { constructor() { this.button = document.createElement('button'); this.button.textContent = 'Clicked 0 times!'; document.body.appendChild(this.button); this.numClicks = 0; this.handleClick = this.handleClick.bind(this); this.button.addEventListener('click', this.handleClick); } handleClick() { this.numClicks++; // Increment the number of clicks this.button.textContent = `Clicked ${this.numClicks} times!`; } }