张敏
|
e693d3f321
|
In `Transferring Props` guide, `Manual Transfer` section will lead an error
```c
var FancyCheckbox = React.createClass({
render: function() {
var fancyClass = this.props.checked ? 'FancyChecked' : 'FancyUnchecked';
return (
<div className={fancyClass} onClick={this.props.onClick}>
{this.props.children}
</div>
);
}
});
React.render(
<FancyCheckbox checked={true} onClick={console.log}>
Hello world!
</FancyCheckbox>,
document.body
);
```
When click `Hello world!` will lead a `Uncaught TypeError: Illegal invocation` error
|
10 years ago |