Skip to content

useLeaveUnload ​

Overview ​

A hook that listens for route changes and warns the user if they have unsaved changes.

Signature ​

useLeaveUnload(props)

Parameters ​

NameTypeRequiredDescription
propsanyyesThe reactive state to condition the unsaved changes popup on.

Returns ​

void

Source ​

client/lib/use/useLeaveUnload.js:28