Skip to content

Instantly share code, notes, and snippets.

@artyomtrityak
Created January 1, 2014 12:08
Show Gist options
  • Save artyomtrityak/8207421 to your computer and use it in GitHub Desktop.
Save artyomtrityak/8207421 to your computer and use it in GitHub Desktop.
view.js:
/**
* @jsx React.DOM
*/
define(function(require) {
'use strict';
var template = require('jsx!./template'),
React = require('react');
var MyComponent = React.createClass({
test: 1,
render: function() {
return template.apply(this);
}
});
React.renderComponent(
<MyComponent date={new Date()} />,
document.getElementById('wrap')
);
});
--------
template.jsx
/**
* @jsx React.DOM
*/
<div>
<p>Howdy222 - {this.test} aaa</p>
<div>
Hello man
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment