Skip to content

use/useLeaveUnload ​

Overview ​

Warns the user via a confirmation dialog when they attempt to navigate away or close the tab while there are unsaved form changes.

Methods ​

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

Types ​

UseLeaveUnloadRefsProps ​

UseLeaveUnloadReactiveProps ​

UseLeaveUnloadReactiveProps = Reactive

Source ​

client/lib/use/useLeaveUnload.js:1