alertonleave
v1.0.4
Published
Alert on leave
Downloads
5
Readme
Install
npm install alertonleave --save
Use
import {alertOnLeave} from "alertonleave";
const dispose = alertOnLeave(()=>{
if (someCondition) {
return "Are you sure you want to leave?"
}
});
// When you don't want to check anymore
dispose();
Build with TypeScript 🌹