JSFiddle - React, Tailwind, and code Playground

HTML

<div></div>

CSS

div {
    height: 50px;
    width: 50px;
    background-color: rgba(255,0,0,0.3);
    border-radius: 50%;
    line-height: 50px;
    color: green;
    text-align: center;
}

JavaScript

var x = 1;

var fun = function(v) {
    $('div').html(v); 
}

var set = function(v, value) {
    v = value;
    fun(v);
}

var counter = 0;
setInterval(function() {
   set(x,++counter);
}, 100);