JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://malsup.github.com/jquery.blockUI.js"></script>
<a href="/echo/html?delay=3">Clicking here will load a blank page into this frame, but the new page will take 3 seconds to load.</a>
JavaScript
$(window).on('beforeunload', function(e) {
$.blockUI();
});