JSFiddle - React, Tailwind, and code Playground
JavaScript
var html,
len = 271860,
pieces = ['<ul>']
for (var i = 0; i < len; i++) {
pieces.push('<li>Foo</li>');
}
pieces.push('</ul>');
html = pieces.join('');
pieces = null;
$('body').append($('<div>').text('Len: ' + html.length));
//no need to do $(html)
$('body').append(html);