Created
October 23, 2015 22:36
-
-
Save xfsnowind/9ac583fa815adcb05190 to your computer and use it in GitHub Desktop.
preparation codes on blog "React -- Communication between components" on 2014/06/24
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // For Parent.js | |
| var Parent = React.createClass({ | |
| render: function () { | |
| return ( | |
| <div><input onchange="" type="text" value="Parent"></input><child></child></div> | |
| ); | |
| } | |
| }); | |
| // For Child.js | |
| var Child = React.createClass({ | |
| render: function () { | |
| return ( | |
| <div. onclick="" type="button" value="Child"></div.> | |
| ); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment