# Function unstable_usePrompt

- unstable_usePrompt(__namedParameters): void

- 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.

  #### Parameters

  - __namedParameters: {
    message: string;
    when: boolean | BlockerFunction;
    }

    - ##### message: string

    - ##### when: boolean | BlockerFunction

  #### Returns void

  - Defined in common/temp/node_modules/.pnpm/react-router-dom@6.23.1_react-dom@18.3.1+react@18.3.1/node_modules/react-router-dom/dist/index.d.ts:303