mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Merge pull request #2344 from ThomasCrvsr/master
Use React.createFactory in examples/basic/
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user