title | toc | order |
---|---|---|
Navigation Blocking |
false |
1 |
This example demonstrates using useBlocker
to prevent navigating away from a page where you might lose user-entered form data. A potentially better UX for this is storing user-entered information in sessionStorage
and pre-populating the form on return.
Open this example on StackBlitz: