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

feat(useBeforeUnload): allow passing a dirty function (#842) #867

Merged
merged 1 commit into from
Feb 15, 2020

Conversation

bebbi
Copy link
Contributor

@bebbi bebbi commented Jan 8, 2020

Description

Allow passing a function as dirty flag to useBeforeUnload hook.
Link documentation of an example how to use this with fast-changing dirty functions.

Closes #842

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as before)

Checklist

  • Read the Contributing Guide
  • Perform a code self-review
  • (n.a.) Comment the code, particularly in hard-to-understand areas
  • Add documentation
  • Add hook's story at Storybook
  • (n.a.) Cover changes with tests
  • Ensure the test suite passes (yarn test)
  • Provide 100% tests coverage
  • Make sure code lints (yarn lint). Fix it with yarn lint:fix in case of failure.
  • Make sure types are fine (yarn lint:types).

@bebbi bebbi force-pushed the feat/before-unload-callback branch from d0aff00 to c4a14a4 Compare January 8, 2020 12:44
@bebbi
Copy link
Contributor Author

bebbi commented Jan 8, 2020

@streamich stumbled into another review, made an aesthetic fix and did a history-rewriting commit (c4a14) assuming you haven't pulled it yet.

Copy link
Owner

@streamich streamich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@streamich streamich merged commit 5ea486e into streamich:master Feb 15, 2020
@streamich
Copy link
Owner

🎉 This PR is included in version 13.25.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@AuthorProxy
Copy link

AuthorProxy commented Oct 19, 2022

@streamich doesn't work with react router - correct? If you need to maintain routing to another page.

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

Successfully merging this pull request may close these issues.

useOnBeforeUnload() on expensive dirty flag
3 participants