Files
react/js/examples/hello.js
T
Paul O’Shannessy f6b0e9d59b v0.11.0
2014-07-17 13:53:28 -07:00

20 lines
400 B
JavaScript

/**
* @jsx React.DOM
*/
var HELLO_COMPONENT = "\
/** @jsx React.DOM */\n\
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')
);