mirror of
https://github.com/zebrajr/react.git
synced 2026-01-15 12:15:22 +00:00
#2315 : Use of React.createFactory in example basic/
This commit is contained in:
@@ -38,13 +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(
|
||||
/* Call React.createElement instead of
|
||||
* ExampleApplication({...}) which is depecrated
|
||||
*/
|
||||
React.createElement(ExampleApplication, {elapsed: new Date().getTime() - start}),
|
||||
ExampleApplicationFactory({elapsed: new Date().getTime() - start}),
|
||||
document.getElementById('container')
|
||||
);
|
||||
}, 50);
|
||||
|
||||
Reference in New Issue
Block a user