调用 ReactDOM.render() 来修改想要渲染的元素
function tick(){
const element1=(
<div>
<h1>h,w</h1>
<h2>it is {new Date().ToLocalTimeString()}.</h2>
</div>
);
ReactDom.render(element1,document.getElementById("root"));
}
setInterval(tick,1000);
标签:element1,react,调用,render,渲染,---,ReactDOM From: https://www.cnblogs.com/onetask/p/17254428.html