JSFiddle - React, Tailwind, and code Playground
JavaScript
var list = readHugeList();
var nextListItem = function() {
var item = list.pop();
if (item) {
console.log(item)
// process the list item...
setTimeout( nextListItem, 0);
}
};