Right now we use codemirror's JavaScript mode on the website but there's a JSX mode now so we should start using that instead.

this.state.code !== prevState.code) {
      this.executeCode();
    }
  },
  executeCode: function() {
    var mountNode = ReactDOM.findDOMNode(this.refs.mount);
    try {
      ReactDOM.unmountComponentAtNode(mountNode);
    } catch (e) { }
    try {
      var compiledCode = this.compileCode();
      if (this.props.renderCode) {
        ReactDOM.render(
          <CodeMirrorEditor codeText={compiledCode} readOnly={true} />,
          mountNode
        );
      } else {
        eval(compiledCode);
      }
    } catch (err) {
      this.setTimeout(function() {
        ReactDOM.render(
          <div className="playgroundError">{err.toString()}</div>,
          mountNode
        );
      }, 500);
    }
  },
});