Create jsx.js

added JSX (XML-like syntax extension to ECMAScript) for React
as specified at https://facebook.github.io/jsx/
This commit is contained in:
Paul Hofmann
2015-05-06 16:16:39 +02:00
parent a60d74d246
commit 1c1ea40ca5

12
j/jsx.js Normal file
View File

@@ -0,0 +1,12 @@
var React = require('react');
var HelloWorld = React.createClass({
displayName: 'HelloWorld',
render: function() {
return (
<span>Hello World</span>
);
}
});
console.log(React.renderToString(<HelloWorld />));