Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react beforeunload

window.addEventListener('beforeunload', (event) => {
  event.returnValue = `Are you sure you want to leave?`;
});
Source by dev.to #
 
PREVIOUS NEXT
Tagged: #react #beforeunload
ADD COMMENT
Topic
Name
5+5 =