Skip to content

Latest commit

 

History

History

before-unload

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

🎒 @hooks/before-unload

React hook to provide a message prompt before the page is unloaded

NPM version Travis License

Install

npm i @hooks/before-unload

Usage

useBeforeUnload

useBeforeUnload(message?: string)

Parameters

message?: string

If provided, will cause the message to be shown before the page is unloaded.