history icon indicating copy to clipboard operation
history copied to clipboard

Allow adding blockers that don't create a beforeUnload event

Open karlshea opened this issue 3 years ago • 1 comments

This allows adding blockers that don't create a beforeUnload event, so blocks can prevent or otherwise handle location changes but won't block reloading the page.

Normal blockers are looked at first (to support prompts), and then if they all allow the transaction the no-unload blockers are checked afterwards.

See #921 for reasoning (forcing a full page load for non-SPA routes). What are the maintainer's thoughts on this approach?

karlshea avatar Apr 20 '22 22:04 karlshea

Could also add a flag to block. would like to see some solution merged, I had to drop the blocking feature on an app so i can upgrade to react-router v6 which sucks :(

ofirgeller avatar Oct 05 '22 18:10 ofirgeller