Hacker News new | ask | show | jobs
by ishjoh 1418 days ago
Thank you, react-query is one of the solutions we were looking into, glad to hear there are happy users of it.

One thing I like about the apollo client is that it handles a lot of the cache invalidation for you, where as react-query it seems to be a bit more of a manual process, how are you and your team handling cache invalidation?

1 comments

react-query indeed doesn't automatically take care of this. We manually invalidate its caches (based on the query key, so you only ever invalidate what has changed) after a mutation happens. It's not as bad as it sounds because most of the time it's just one line of code.