JSFiddle - React, Tailwind, and code Playground
HTML
<span>0</span>
JavaScript
$(function() {
var i = 0;
(function patch() {
console.log('patch', JSON.stringify($.cache ));
$(document).delegate('span', 'click', function() {
console.log('run');
$.cache = {};
document.open();
document.write('<span>'+(++i)+'</span>');
document.close();
patch();
});
}())
});