I want a prompt to appear at the moment of wanting to leave the page without having canceled or without having sent the changes
As of v6.0.0-beta - useBlocker and usePrompt were removed I want to know another way to do it.
This doesn't work anymore:
<Promptwhen={formik.dirty}message="You have unsaved changes. Are you sure you want to leave?"/>
Nor this:
useBlocker(() => "Hello from useBlocker -- are you sure you want to leave?",isBlocking);