I'm trying to convert the HTML template to react js. I have a js file where some functions are defined. Now when I tried to call that function in react js it shows me an error
'abc' is not defined no-undef
Below is the function and details how I use to call it:
class App extends React.Component {
render() {
return (
<li>
<a href="#" onClick={abc('purple')} title="purple" className="color">link</a>
</li>
);
}
}
function.js
abc(color){
alert(color);
}