Router.run(routes, Router.HashLocation, function(Root) { React.render(<Root/>, document.getElementById("main")); });
React.render( React.createElement(Provider, {store: store}, function(){ return (<App/>) } ), document.getElementById('root') );
/* Once we bootstrap the stores, we run react-router using Router.HistoryLocation The element is created and we just render it into the container */ Iso.bootstrap(function (state, _, container) { alt.bootstrap(state) Router.run(routes, Router.HistoryLocation, function (Handler) { var node = React.createElement(Handler) React.render(node, container) }) })
setInterval(function() { React.render( <ExampleApplication elapsed={new Date().getTime() - start} />, document.getElementById('container') ); }, 50);
$.ajax({ url: '/json/items.json' }).then(function (items) { console.log('items', items); React.render(<NewsItem item={items[0]} rank={1}/>, $('#content')[0]); });
domready(() => { React.render( <Content />, document.body ); })
Router.run(AppRoutes, Router.HistoryLocation, function(Handler, state) { var HandlerElement = React.createElement(Handler, { path: window.location.pathname }); React.render(HandlerElement, document); });
setTimeout(function () { var React = require('react'); var Timer = require('./TimerEnhance'); React.render(<Timer />, document.getElementById('react-root')); }, 3000);
//get data from server ArticleAPI.getData(function(){ React.render( <Article/>, document.getElementById("content") ); });
Router.run(Routes, function(Handler, state) { /*jshint ignore:start */ React.render(<Handler params={state.params}/>, document.body); /*jshint ignore:end */ });
Router.run(routes, function(Handler, state) { React.render(<Handler />, document.body); })
Router.run(function (Handler, state) { React.render(<Handler {...state.params} />, document.getElementById('app')); });
Router.run(routes, function (Handler) { React.render(<Handler/>, document.getElementById('example')); });
setInterval(function() { React.render( <ExampleApplication elapsed={new Date().getTime() - start} />, document.getElementById('container') ); }, 50);