I have a React project. The project was bootstraped with create-react-app
with default configurations. I have defined an arrow function in a class in line 60:
handleClose = () => {
this.props.history.push('/');
window.location.reload();
}
But on compilation, an error comes:
Can you please help me solve this issue? Its saying that function itself is not defined at line 60
but we are defining that function at that line only. Note that this is not an issue with the calling of the function. The compiler is giving error for all the arrow functions defined.