@samitouri / QOS-React-2 / commits / e3734e2b43

#2315 : Use of React.createFactory in example basic/

ThomasCrvsr committed Oct 15, 2014 at 09:20 UTC e3734e2b434fc221fb101ed386c396c8b5d7f70e
1 file changed +5 -4
examples/basic/index.html
+5 -4
@@ -38,13 +38,14 @@
38 return React.DOM.p(null, message);
39 }
40 });
41 +
42 + // Call React.createFactory instead of directly call ExampleApplication({...}) in React.renderComponent
43 + var ExampleApplicationFactory = React.createFactory(ExampleApplication);
44 +
45 var start = new Date().getTime();
46 setInterval(function() {
47 React.renderComponent(
44 - /* Call React.createElement instead of
45 - * ExampleApplication({...}) which is depecrated
46 - */
47 - React.createElement(ExampleApplication, {elapsed: new Date().getTime() - start}),
48 + ExampleApplicationFactory({elapsed: new Date().getTime() - start}),
49 document.getElementById('container')
50 );
51 }, 50);