JSFiddle - React, Tailwind, and code Playground

by Sudheer Nunna

JavaScript

var list = readHugeList();

var nextListItem = function() {
    var item = list.pop();

    if (item) {
    console.log(item)
        // process the list item...
        setTimeout( nextListItem, 0);
    }
};