JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.11/lodash.min.js"></script>
<div></div>
CSS
div {
background-color: red;
width: 0;
height: 100px;
}
JavaScript
var throttled = _.throttle(updateWidth, 0)
var i;
function updateWidth() {
$('div').animate({width: i}, 0);
}
for (i = 0; i < 100; i++) {
$('div').animate({width: i}, 0);
}