Asks the user to confirm an action in the theme's alert dialog, instead of the browser's window.confirm, which
ignores the app's look and blocks the page. Call sites read like window.confirm but await the answer:
const [confirm, confirmDialog] = useConfirm() if (!(awaitconfirm({ title:'Delete this item?', confirmLabel:'Delete', confirmVariant:'danger' }))) return // render `confirmDialog` somewhere that stays mounted while the question is open
Asks the user to confirm an action in the theme's alert dialog, instead of the browser's
window.confirm, which ignores the app's look and blocks the page. Call sites read likewindow.confirmbut await the answer: