My simple code is:
main.js:
var ReactDom = require('react-dom');
var Main = React.createClass({
render: function(){
return(
<div>
<a onClick={alert("hello world")} >hello</a>
</div>
)
}
});
An error occurred in the console:
TypeError: the listener must be a function
Error:
while running this code, I get this warning function instead of what it should be on the click function.
Note . I am using a stream structure, but there was no data in the given file.
Thanks in advance
source
share