Hacker News new | past | comments | ask | show | jobs | submit login

There are some nice to have features in React Query off of the shelf, but nothing I’m aware of that can’t be accomplished with SWR if needed. There’s scroll restoration and offline mutations primarily. I’ve never actually needed either of those, and I personally prefer SWR because it’s so lightweight, out of the way, and portable. One thing RQ definitely has over SWR is better dev tools, but I’ve never actually needed or wanted them for either library.

People do seem to prefer RQ generally, maybe because it’s a bit more intuitive and better documented. It might be a better choice for more complex caching and mutating needs. SWR is still so easy and intuitive as it is, so I haven’t seen a reason to prefer RQ by default.




OOTB offline-first sounds handy. With SWR I had to modify the fetcher to query and store in indexedDB and then later replay to remote, which while not exactly difficult did require some effort.

I guess its worth giving it a spin and see for myself :)




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: