Hex Core JS
    Preparing search index...

    Type Alias NavigationPromptProps

    type NavigationPromptProps = {
        message?: string | MessageFunction;
        when?: boolean;
    }
    Index

    Properties

    Properties

    message?: string | MessageFunction

    The message to display to the user or a function that returns either a message to display or a boolean indicating whether the location change should be allowed. If message is a function and returns a boolean, no user confirmation is rendered. If true is returned the location change proceeds as usual (as if no <NavigationPrompt> were rendered at all). If false is returned, the navigation is blocked.

    when?: boolean

    Controls whether the prompt should be displayed (equivalent to conditionally rendering the <NavigationPrompt>).