<body>
<div id="root"></div>
<script src="https://unpkg.com/[email protected]/umd/react.development.js"></script>
<script src="https://unpkg.com/[email protected]/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/@babel/[email protected]/babel.js"></script>
<script type="text/babel">
const rootElement = document.getElementById('root');
function tick() {
const time = new Date().toLocaleTimeString();
const element = `
<div>
<input value="${time}" />
<input value="${time}" />
</div>
`;
rootElement.innerHTML = element;
}
tick();
setInterval(tick, 1000);
</script>
</body>
<body>
<div id="root"></div>
<script src="https://unpkg.com/[email protected]/umd/react.development.js"></script>
<script src="https://unpkg.com/[email protected]/umd/react-dom.development.js"></script>
<script src="https://unpkg.com/@babel/[email protected]/babel.js"></script>
<script type="text/babel">
const rootElement = document.getElementById('root');
function tick() {
const time = new Date().toLocaleTimeString();
const element = (
<>
<input value={time} />
<input value={time} />
</>
);
ReactDOM.render(element, rootElement);
}
tick();
setInterval(tick, 1000);
</script>
</body>