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
national-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: vicious-gold•2y ago
Can you please post a reproduction?
national-goldOP•2y ago
Screen recording?
vicious-gold•2y ago
😅 no
Codesandbox, stackblitz, …
national-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?
vicious-gold•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
national-goldOP•2y ago
Yep, I'm preparing the sandbox
wise-white•2y ago
there's nothing wrong with the code here. seems like a backend issue, not RQ related