React Query has a more robust and feature-rich API
This is highly subjective... While it's true that SWR is still in beta, it does offer an extensive API and off the top of my head I cannot think of anything that it's missing compared to React Query... Also React Query doesn't support ISR. It depends on what you're looking for really.
I'm also not sure about your claims on performance... SWR definitely seems much more agressive about caching, prefering stale data over refetching...
By default, queries that unmount or become unused before their promises are resolved are not cancelled.
Both React Query and SWR work with providing your own fetcher. Cancelling requests depends on what fetcher you use...
// Example abort with fetch:constcontroller=newAbortController()fetch('https://google.com',{signal:controller.signal}))controller.abort()// Example abort with axiosconstsource=axios.CancelToken.source()axios.get('https://google.com',{cancelToken:source.token})source.cancel()
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
SWR most certainly does provide pagination: swr.vercel.app/docs/pagination
This is highly subjective... While it's true that SWR is still in beta, it does offer an extensive API and off the top of my head I cannot think of anything that it's missing compared to React Query... Also React Query doesn't support ISR. It depends on what you're looking for really.
I'm also not sure about your claims on performance... SWR definitely seems much more agressive about caching, prefering stale data over refetching...
SWR will not cancel processing tasks while react-query will do that on these aspect react-query is bit ahead.
From React Query documentation:
Both React Query and SWR work with providing your own fetcher. Cancelling requests depends on what fetcher you use...