react check if state doesn't change code example
Example: props and state react
function tick() {
const element = (
Hello, world!
It is {new Date().toLocaleTimeString()}.
);
ReactDOM.render( element, document.getElementById('root') );}
setInterval(tick, 1000);