Why is my component not rerendering
Hello I have a component in which I call the useDocuments hook:
I use
currentDocuments for filtering and other stuff.
The hook looks like this:
Now when I do a mutation like this:
I expected that my useDocuments should automatically update the data with the updated data and trigger a re-render, but somehow the UI does not update?2 Replies
eastern-cyanOP•3y ago
I also checked and the query keys are the same
optimistic-gold•3y ago
Your useEffect is straight from a horror movie 💀
Why don’t you use useMutation for mutation?
Show how you’re using the mutation