useBeforeUnload
useBeforeUnload
Framework Data Declarative
Summary
Set up a callback to be fired on Window's beforeunload event.
Signature
function useBeforeUnload(
callback: (event: BeforeUnloadEvent) => any,
options?: {
capture?: boolean;
},
): voidParams
callback
The callback to be called when the beforeunload event is fired.
options.capture
If true, the event will be captured during the capture phase. Defaults to false.
Returns
No return value.