Closed nelsonfrank closed 5 years ago
@Nelsonfrank you will have to bind the context to that function.
So:
<button onClick={handleChange.bind(this)}> Click Me</button>
You can arrow this by using the // ES6 arrow function to capture this context:
handleChange = () => {...}
I was trying to call
this.state.name
on the function handleChange then try to call the function on Button OnClick event