Skip to content

Instantly share code, notes, and snippets.

Avatar

Anders Ekdahl andersekdahl

View GitHub Profile
View gist:23c63e7a976d0af7a7f858f84ff4074b
class Editable extends React.Component {
componentDidMount() {
const node = ReactDOM.findDOMNode(this);
// Do stuff with the DOM node to make both React and
// the CMS we use happy
}
render() {
if (this.props.Component) {
return <this.props.Component {...this.props} />;
} else {