Replace redirect after a fetcher submit #2083
-
I've got a modal that appears when a certain search parameter is populated. The modal has a form that submits some data to an action api route via a fetcher, and that route returns a redirect. Is it possible to make it so that the back button doesn't return the user to the modal in this scenario? Adding a replace prop onto the fetcher.Form didn't seem to work. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 9 replies
-
Fetcher doesn't navigate, so I'm a little confused by your question. It's expected that replace wouldn't work, because there was no navigation to begin with. Although I haven't tried myself what happens when you submit via fetcher to an action that returns a redirect. Would submitting via |
Beta Was this translation helpful? Give feedback.
-
Any reason you're using a fetcher instead of |
Beta Was this translation helpful? Give feedback.
Any reason you're using a fetcher instead of
<Form>
orsubmit()
?