parent
54ef424e81
commit
fc2b5db338
@ -0,0 +1,9 @@
|
||||
### Pass props to parent component in React.js
|
||||
|
||||
```
|
||||
var Child = React.createClass({
|
||||
render: function () {
|
||||
return <button onClick={this.props.onClick}>{this.props.text}</button>;
|
||||
},
|
||||
});
|
||||
```
|
Loading…
Reference in new issue