Post
Yes and no, please consider swr swr.vercel.app as a more pluggable alternative. Tanstack query is great but a mix of confusing use cases
swr.vercel.appReact Hooks for Data Fetching – SWRSWR is a React Hooks library for data fetching. SWR first returns the data from cache (stale), then sends the fetch request (revalidate), and finally comes with the up-to-date data again.
There's only ever 2 reasons for using SWR: 1. You admire Vercel and want to be pure to their software. I can respect that. 2. You need to save 9kb and are happy to forgo all of these features (and IMO better pluggability, types, DX): tanstack.com/query/latest...
0 reposts5 likes