Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how can i use when => Promise<boolean> #67

Open
FunctionRun opened this issue Jul 13, 2020 · 1 comment
Open

how can i use when => Promise<boolean> #67

FunctionRun opened this issue Jul 13, 2020 · 1 comment

Comments

@FunctionRun
Copy link

"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
    }}
/>
@ZacharyRSmith
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants