Re:TanStack Query(a.k.a. React Query) v5 announced
by andix on Thursday October 19, 2023 @07:42AM
(#37941502)
In my opinion react query doesn't really add complexity if you just use to "await" your fetches. It even comes with the nice added functionality to refetch everything when refocusing the browser. And some automatic error handling.
Once you need query invalidation it gets really useful.
But it also depends how you use fetch right now. If you do it on per-route basis, than react query might not bring a lot of benefits.
Re:TanStack Query(a.k.a. React Query) v5 announced
by klauserc on Thursday October 19, 2023 @10:24AM
(#37943328)
Mix of both. Some data needs to be ready on page load, but we also have quite a number of interactive use cases (e.g., form validation with a backend query).
Once you need query invalidation it gets really useful.
But it also depends how you use fetch right now. If you do it on per-route basis, than react query might not bring a lot of benefits.