JSFiddle - React, Tailwind, and code Playground

JavaScript

window.onbeforeunload = function(e) {
 return "Click STAY ON PAGE then SAVE to save any data you've entered.\n If you've already SAVED select LEAVE PAGE to continue."; 
}