mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-25 23:05:23 +00:00
I kept some places intact (search for @jsx) because they require other bigger changes: - ref-01-top-level-api.md - grunt/tasks/npm.js - old blog posts (don't change those) - examples/ folder, as they have their own package.json that rely on old dependencies (node-jsx, reactify) that haven't upgraded to 0.12
15 lines
350 B
JavaScript
15 lines
350 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.renderComponent(<HelloMessage name=\"John\" />, mountNode);\
|
|
";
|
|
|
|
React.renderComponent(
|
|
<ReactPlayground codeText={HELLO_COMPONENT} />,
|
|
document.getElementById('helloExample')
|
|
);
|