Last active
August 29, 2015 14:22
-
-
Save marr/e2e85553fac822fb3adf to your computer and use it in GitHub Desktop.
This file contains 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
var Parent = require('./Parent'); | |
export class Child extends Parent { | |
constructor(props) { | |
super(props) | |
} | |
render() { | |
super.render() | |
return <span>pep pep</span> | |
} | |
} |
This file contains 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
import Child from '.'; | |
import React; | |
return React.render(<Child />, document.body); | |
// would want output like <div class="pepaw"><span>pep pep</span></div> |
This file contains 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
var React = require('react'); | |
var Parent = React.createClass({ | |
render: function() { | |
return <div className="pepaw">{this.props.children}</div>; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment