Replies: 3 comments 4 replies
-
|
yes, you can. react-query only cares about the promises returned from the queryFn. with POST requests, you can't do caching on network level in the browser, but that's a different topic :) |
Beta Was this translation helpful? Give feedback.
-
|
Yes! While useQuery in React-Query is primarily designed for GET requests, you can still cache POST request responses by using the queryClient to manually set or update the cache after a mutation. This way, you can benefit from caching even when working with POST APIs. By the way, Surah Yaseen is a dedicated Islamic platform offering the full Surah Yaseen with authentic Arabic text, clear translations, and spiritual benefits to help readers connect deeply with the Quran and strengthen their faith. |
Beta Was this translation helpful? Give feedback.
-
|
Great point about caching being independent of the request method. Having clear, reliable behavior makes systems easier to trust just like in real-life situations where people rely on dependable services, such as bail bonds Tampa, to guide them quickly and clearly through a stressful process. Straightforward solutions always matter. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
All of apis that backend provided me are post methods. I read that useQuery provides caching functionality. Can i use caching in react-query despite my apis post methods?
Beta Was this translation helpful? Give feedback.
All reactions