Browse Source
```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` errormain
张敏
10 years ago
1 changed files with 1 additions and 1 deletions
Loading…
Reference in new issue