Query returning old data after mutation when manually setting data using setQueryData
2 Replies
eastern-cyanOP•9mo ago
Usage in another hook is as following
useful-bronze•9mo ago
A query function can be literally any function that returns a promise
getQueryData is a synchronous functionSo your useSelectedCompany doesn't make much sense.
setQueryData is a synchronous functionSo there's no promise in your mutationFn -> there's nothing to settle -> not sure if the onSettled is even called.