Merge pull request #2344 from ThomasCrvsr/master

Use React.createFactory in examples/basic/
This commit is contained in:
Paul O’Shannessy
2014-10-15 10:48:33 -07:00
+5 -1
View File
@@ -38,10 +38,14 @@
return React.DOM.p(null, message);
}
});
// Call React.createFactory instead of directly call ExampleApplication({...}) in React.renderComponent
var ExampleApplicationFactory = React.createFactory(ExampleApplication);
var start = new Date().getTime();
setInterval(function() {
React.renderComponent(
ExampleApplication({elapsed: new Date().getTime() - start}),
ExampleApplicationFactory({elapsed: new Date().getTime() - start}),
document.getElementById('container')
);
}, 50);