mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
5 lines
353 B
JavaScript
5 lines
353 B
JavaScript
'use strict';
|
|
|
|
var HELLO_COMPONENT = '\nvar HelloMessage = React.createClass({\n render: function() {\n return <div>Hello {this.props.name}</div>;\n }\n});\n\nReactDOM.render(<HelloMessage name="John" />, mountNode);\n';
|
|
|
|
ReactDOM.render(React.createElement(ReactPlayground, { codeText: HELLO_COMPONENT }), document.getElementById('helloExample')); |