Replies: 2 comments 2 replies
-
I was watching a talk on Tanstack router and it said there is a thought of providing actions similar to https://docs.solidjs.com/solid-router/concepts/actions which seems really nice I wonder what happened to that plan? |
Beta Was this translation helpful? Give feedback.
0 replies
-
why not just use react-query's |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Tanstack router has great data loading options. But I couldn't find much detail about how to handle the submission part, apart from router.invalidate() and The docs mention its left upto user to implement.
https://tanstack.com/router/latest/docs/framework/react/guide/data-mutations
But remix/react-router has a nice clientAction method where say you can call some API and redirect user on completion.
For a framework that aims to make it easier to work with SPAs, this is something that would be great.
In the Kitchen sink example there is this custom useMutation hook - how about providing something like this out of the box?
https://github.com/TanStack/router/blob/main/examples/react/kitchen-sink-file-based/src/hooks/useMutation.tsx
Beta Was this translation helpful? Give feedback.
All reactions