1class MainView extends Component {
2 render() {
3 // don't render anything
4 return <div/>;
5 },
6
7 componentDidMount() {
8 // find the DOM node for this component
9 const node = ReactDOM.findDOMNode(this);
10
11 // widget does stuff
12 $(node).activateMyCoolWidget();
13
14 // start a new React render tree with widget node
15 ReactDOM.render(<div>{this.props.children}</div>, node);
16 }
17});