Get data from action in another route #869
-
If I have a
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
I think you can use a fetcher (useFetcher()) to make a form with a GET method. |
Beta Was this translation helpful? Give feedback.
-
You need to move the action to the same route where you can useLoaderData or use session.flash so save the action data and redirect back to the url of the form, then read the data from the session inside the loader of that route. |
Beta Was this translation helpful? Give feedback.
-
Like @sergiodxa said, you need to
|
Beta Was this translation helpful? Give feedback.
Like @sergiodxa said, you need to
useFetcher
- doesn't cause navigation, doesn't server render, doesn't work without JS but probably matches your current mental model for this feature