mirror of
https://github.com/facebook/react.git
synced 2026-02-26 18:58:05 +00:00
This covers most everything. The perf suite still needs work for the Element updates. And the server rendering example needs to be done wholesale.
15 lines
332 B
JavaScript
15 lines
332 B
JavaScript
var HELLO_COMPONENT = "\
|
|
var HelloMessage = React.createClass({\n\
|
|
render: function() {\n\
|
|
return <div>Hello {this.props.name}</div>;\n\
|
|
}\n\
|
|
});\n\
|
|
\n\
|
|
React.render(<HelloMessage name=\"John\" />, mountNode);\
|
|
";
|
|
|
|
React.render(
|
|
<ReactPlayground codeText={HELLO_COMPONENT} />,
|
|
document.getElementById('helloExample')
|
|
);
|