JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://raw.github.com/timrwood/moment/1.6.2/min/moment.min.js"></script>
<span id="time"></span>
JavaScript
function displayTime() {
document.getElementById("time").innerHTML =
moment().format("hh:mm:ss A");
}
setInterval(displayTime, 1000);