TanstackQuery useMutation example
Hey folks, would like your takes/assistance on a silly one. I'm using TSQ for a small SolidJS project and I'm trying to create a mutation but it seems like the newer version does not support the previous version in which we passed a
And I'm trying to create a new mutation using the following:
But what i'm getting is an error stating that both
P.S. Using
Edit: I know I can just use
mutationFn and a mutationKey . This is the way I usually go about it. I've got the follow function to create a thing:And I'm trying to create a new mutation using the following:
But what i'm getting is an error stating that both
mutationKey and mutationFn does not exist in our types anymore....Also the examples in the docs do not cover mutation creation anymore. How did ya'll work your way around this change? P.S. Using
"@tanstack/solid-query": "^5.59.17",Edit: I know I can just use
createQuery and achieve the same?? result but I really liked how we had separate actions to handle data fetching and data manipulation.