title: React-Router v6: Can you change the destination of a <Prompt /> component?
body: <p>I have a flow in my app that has the user going through a few pages.</p>
  <p>Normal flow would be 1 -&gt; 2 -&gt; 3</p>
  <p>I want to restrict the user from going back with a prompt, which is not an issue, but if the user performs an action on page 3, I don't want to allow the user to go back to page 2. Is there a way I can change the back button destination to page 1 when the user sees a prompt on page 3?</p>
  <p>My first idea was creating a <code>useEffect</code> that would check if they should go to page 1 instead of page 2, and modify the history stack, then clean it up in the return function of the useEffect. I can't figure out how to accomplish this right now since react-router v6 removed useHistory. Is there a better way to do this? Maybe with <code>useBlocker</code>?</p>
  <p>Thanks!</p>