How to replace with redirect on an action #10672
-
With the useNavigate API you can set the "replace" option to replace the entry on the history stack. On the other hand with an action on the router, when using a redirect response you don't have a way to do that. I have a login route that makes the authentication on the action. So I want to redirect to a page when logged in, but replacing the login entry on the history. |
Beta Was this translation helpful? Give feedback.
Answered by
brophdawg11
Jul 6, 2023
Replies: 1 comment
-
If you're using |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
brophdawg11
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you're using
RouterProvider
andaction
you can control this via<Form replace>
and the prop should persist through the redirect.