const {render} = require('react-dom');
const {DOM} = require('react');
render(
DOM.div({className="something"},
DOM.div({className="something-else"},
'some text',
),
),
document.getElementById('root'),
);
Components become useful pretty quickly as your views grow in size, but even then, function components require very little extra code to use.And can I be sure that React will not perform updates behind the scenes at other moments than when calling "render"?
In answer to your second question, yes, React currently only does anything as a consequence of calling `render`, or `.setState()`/`.forceUpdate()` in the case of a component class (not relevant if you're not using component classes).
In future, the (currently experimental) 'fiber' render will allow some rendering to be deferred until after the current call stack has finished (to avoid blocking the UI), but there should be away to tell React to do all rendering synchronously if you desire (which is necessary for eg. rendering on the server). There's no reason why the current behavior couldn't be supported on top of the new experimental renderer though.