Accesses the close confirmation context and calls to require confirmation on close when the given condition is true
and removes the confirmation requirement when the condition becomes false (or on unmount).
Parameters
condition: boolean
The condition to use for requiring close confirmation.
Accesses the close confirmation context and calls to require confirmation on close when the given condition is true and removes the confirmation requirement when the condition becomes false (or on unmount).