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

DRY beforeUnload behavior #5977

Open
philippotto opened this issue Jan 21, 2022 · 0 comments
Open

DRY beforeUnload behavior #5977

philippotto opened this issue Jan 21, 2022 · 0 comments

Comments

@philippotto
Copy link
Member

philippotto commented Jan 21, 2022

Description

See #5948 for context. The current behavior (which serves the browser's beforeUnload as well as the react-router's one) is currently used in:

  • tracing layout view
  • dataset import view
  • dataset upload view

Ideally, we would use a react hook to DRY this mechanism, however, the using components would need to be converted to functional components first. Maybe a HOC is also a viable option.

Impact

Rather lower. The next time we touch this code, it would be a good idea to tackle this issue.

Cost

0.5 day ?

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

1 participant