T
TanStack2y ago
other-emerald

I'm stuck with latest changes to use query and mutation

Docs didn't provide much on use query and mutation after 'removing the callback', use query and mutation, and no examples provided!! I need examples on how to use both, Thanks in advance
3 Replies
sunny-green
sunny-green2y ago
The migration guide in the docs leads to this: https://tkdodo.eu/blog/breaking-react-querys-api-on-purpose
Breaking React Query's API on purpose
Why good API design matters, even if it means breaking existing APIs in the face of resistance.
other-emerald
other-emeraldOP2y ago
I read it but I think i should go with useEffect? but u said no in another question and this confusing as im not quite following which better usage now in basic example (useQuery, useMutation) as im not expert in react-query
sunny-green
sunny-green2y ago
- mutations still have the callback - for queries, it depends on what you were doing. There is no "replace all callbacks with XYZ" silver bullet

Did you find this page helpful?