Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

unstable_usePrompt

Wrapper around useBlocker to show a window.confirm prompt to users instead of building a custom UI with useBlocker.

Warning: This has a lot of rough edges and behaves very differently (and very incorrectly in some cases) across browsers if user click addition back/forward navigations while the confirm is open. Use at your own risk.

function unstable_usePrompt({ when, message }: {
when: boolean;
message: string;
}
): void;
§
unstable_usePrompt({ when, message }: {
when: boolean;
message: string;
}
): void
[src]

§Parameters

§
{ when, message }: {
when: boolean;
message: string;
}
[src]

§Return Type