JSFiddle - React, Tailwind, and code Playground
by joplomacedo
JavaScript
startBar() {
let count = 0;
const interval = setInterval( () => {
this.pBar.width = parseInt(this.pBar.width.replace('px','')) + 10 + 'px';
if ( ++count== 30 ) {
clearInterval(interval)
}
}, 1000);
}