I have a component that has onClick: onClick: PropTypes.func in its onClick: PropTypes.func
In another component, I use this component several times to fill the page. Each of these components has a title that, when clicked, should redirect to another page.
The problem is that it does not work when I click on it. He does not do anything. This is a render of the main component:
render() { return ( <Class title={account.AccountName} onClick={() => "mySite/accountview?id=" + account.AccountName} > </Class> ... ); }
What should I add to onClick to make it work?
source share