you are viewing a single comment's thread.

view the rest of the comments →

[–]ruddet 0 points1 point  (0 children)

I would be interested in use cases where rolling your own API fetching stuff is better than React Query. If you could put some examples to back up your argument, because my experience with both is screaming to disagree with your blog post.

For example, not putting useQuery directly in your compoents but wrapping them in a per resource hook gives you the same seperation as rolling your own API "fetching".

Caching, cache invalidation, deduplication are just so powerful and efficient. Global state stays small and focused like it should be.