#root action always redirecting to index

1 messages · Page 1 of 1 (latest)

spark anvil
#

hi all, I have a form in my app root. It's a form in header to customize profile status activity. It can be changed through header. The Form is in root.tsx. Please watch the video and tell me what is wrong or how should I do it otherwise?
the problem is: When I change activity (run the action) I got redirected to index

thorny token
#

A Form navigates on submit. So you go to root when the Form is submitted.
If you want to prevent a navigation, check the doc for useFetcher and you probably want a fetcher.Form instead of a regular Form 😉

#

const statusFetcher = useFetcher()

<statusFetcher.Form>
...
</statusFetcher.Form>