react-router-navigation-prompt icon indicating copy to clipboard operation
react-router-navigation-prompt copied to clipboard

how can i use when => Promise<boolean>

Open FunctionRun opened this issue 4 years ago • 1 comments

"react-router-navigation-prompt": "^1.8.6",

Do you want to request a feature or report a bug? feature

What is the current behavior?

<NavigationPrompt
    when={true}
/>

What is the expected behavior?

<NavigationPrompt
    when={async () => {
        const flag:boolean = await xxxxxx();
        return flag
    }}
/>

FunctionRun avatar Jul 13 '20 10:07 FunctionRun

This is not currently supported. Please open a PR if you get it working!

ZacharyRSmith avatar Jul 13 '20 23:07 ZacharyRSmith