react-router-navigation-prompt
react-router-navigation-prompt copied to clipboard
how can i use when => Promise<boolean>
"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
}}
/>
This is not currently supported. Please open a PR if you get it working!