From e3734e2b434fc221fb101ed386c396c8b5d7f70e Mon Sep 17 00:00:00 2001 From: ThomasCrvsr Date: Wed, 15 Oct 2014 09:20:25 +0200 Subject: [PATCH] #2315 : Use of React.createFactory in example basic/ --- examples/basic/index.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/basic/index.html b/examples/basic/index.html index e2f0a5e10d..0dad9fe1d8 100644 --- a/examples/basic/index.html +++ b/examples/basic/index.html @@ -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);