JSFiddle - React, Tailwind, and code Playground
HTML
<div id="timer">The time is: <div id="time"></div></div>
CSS
#timer, #time{
display: inline;
}
JavaScript
window.onload = function(){date()}, setInterval(function(){date()}, 1000);
function date() {
var now = new Date(),
now = now.getHours()+':'+now.getMinutes()+':'+now.getSeconds();
$('#time').html(now);
}