Error Scenario:
APP = React.createclass ({ = = {return ( <div></div> ); }});
In accordance with the above-mentioned wording, in the use of the app where there will be undefined problems.
There is no problem with the following notation:
APP = React.createclass ({ function () { return ( (<div></div> ); }});
Alternatively, you can use the simplified method of ES6 to define the wording:
APP = React.createclass ({ render () { return ( <div></div> ); }});
Generally speaking, the place that can use lambda certainly as far as possible, concise and beautiful, but the above first kind of writing caused the error, I guess this is the problem, check found lambda and call/apply a little conflict, lambda because automatically bind this, will cause call/ Failed attempt to bind this: Arrow functions-javascript | MDN. In this case, the Lambda's this is bound to the global object: an answer to StackOverflow
I level limit, did not go to read the source of react confirmed that render is binding this use, but the reason for the above error is only this possible:)
The this binding of the ECMASCRIPT6 lambda (arrow function) causes Call/apply to fail