Skip to content

Instantly share code, notes, and snippets.

@marr
Last active August 29, 2015 14:22
Show Gist options
  • Save marr/e2e85553fac822fb3adf to your computer and use it in GitHub Desktop.
Save marr/e2e85553fac822fb3adf to your computer and use it in GitHub Desktop.
var Parent = require('./Parent');
export class Child extends Parent {
constructor(props) {
super(props)
}
render() {
super.render()
return <span>pep pep</span>
}
}
import Child from '.';
import React;
return React.render(<Child />, document.body);
// would want output like <div class="pepaw"><span>pep pep</span></div>
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