Skip to content

Example of useForm with mutation using different resource, than what's used to fetch the data? #2562

Answered by omeraplak
vinclou asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @vinclou ,
I don't know how common this use-case is but you can deal with this using data hooks. Override your form's onSubmit and call your desired data hook (useUpdate, useCreate, etc.). For data store invalidation, you can use useInvalidate. I hope it will be useful for you 💥

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@vinclou
Comment options

Answer selected by vinclou
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants