var HELLO_COMPONENT = "\ var HelloMessage = React.createClass({\n\ render: function() {\n\ return
Hello {this.props.name}
;\n\ }\n\ });\n\ \n\ React.render(, mountNode);\ "; function transformer(harmony, code) { return JSXTransformer.transform(code, {harmony: harmony}).code; } var CompilerPlayground = React.createClass({ getInitialState: function() { return {harmony: false}; }, handleHarmonyChange: function(e) { this.setState({harmony: e.target.checked}); }, render: function() { return (
); } }); React.render( , document.getElementById('jsxCompiler') );