react test

In this example below you will see how to do a react test with some HTML / CSS and Javascript

Thumbnail
This awesome code was written by 1zm0, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright 1zm0 ©
  • HTML
  • CSS
  • JavaScript
    <div id="root"></div>

/*Downloaded from https://www.codeseek.co/1zm0/react-test-rKOPdp */
    body{
  margin: 0;
}
.wrap{
  width: 100vw;
  height: 100vh;
  background-color: peru;
  margin: 0;
}


/*Downloaded from https://www.codeseek.co/1zm0/react-test-rKOPdp */
    

function tick() {
  const element = (
    <div class ="wrap">
      <h1>Hello, world!</h1>
      <h2>It is {new Date().toLocaleTimeString()}.</h2>
    </div>
  );
  ReactDOM.render(element, document.getElementById('root'));
}

setInterval(tick, 1000);





Comments