#2315 : Use of React.createFactory in example basic/
This commit is contained in:
parent
4f1f8c0605
commit
e3734e2b43
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue