Why do PATCH and DELETE requests not refetch the data from the database?
Hello!
When I store data in the database, I usually do it the following way:
But whenever I delete or patch like this:
React query does not re-fetch the data, why?
8 Replies
stormy-goldOP•2y ago
its literally the same thing, all that changes is in the
services.jsx
file, where I handle delete or patch requests the following way: correct-apricot•2y ago
Can you please post a reproduction?
stormy-goldOP•2y ago
Screen recording?
correct-apricot•2y ago
😅 no
Codesandbox, stackblitz, …
stormy-goldOP•2y ago
oh dang, that would take some time, but I'll try. I noticed it does refetch, but it takes quite some time for some reason
is there any way to actually make it faster?
correct-apricot•2y ago
Yea buy more internet
Just kidding. It is hard to help you without knowing your code.
Yes. This takes time. But makes answering your question much more efficient
stormy-goldOP•2y ago
Yep, I'm preparing the sandbox
sunny-green•2y ago
there's nothing wrong with the code here. seems like a backend issue, not RQ related