When my application renders the function contained within my onClick event is invoked without reason. I have looked around at a few other posts and implemented their suggestion but without success.
My function
login = () => {
this.props.login();
};
onClick event inside an tag
<a style={{cursor: 'pointer'}} onClick={ () => this.login }> Log In </a>