I want to display this clock on Vue. The clock should automatically update the time, but how can I make this code work in Vue?
Is there a simple way to implement this in Vue without using (document.getElementBy
...)
function updateTime () {
document.getElementById("time").innerHTML = new Date().toLocaleTimeString();
}
var timeInterval = setInterval(updateTime, 1000);
<div id="time"></div>