V2 of React Query was awesome and brought some amazing new features, more magic, and an overall better experience to the library. It also brought on massive adoption and likewise a lot of refining fire (issues/contributions) to the library and brought to light a few things that needed more polish to make the library even better. This PR contains that very polish.
Overview
A full migration guide is available for moving from v2 to v3 and discusses all of the transformations in detail, but at a high-level, the following features/changes have taken place in v3:
- Better cache isolation, both for use and testing
- More control over global options
- Better SSR Support
- Better definitions/APIs for "pagination" or data lagging
- Bi-directional configuration and manual-updating of infinite queries
- Default configuration support for queries and mutations
- More control over rendering optimizations
- Query data selectors
- Variable-length parallel query execution
- Retry/offline/persistant support for mutations
- General query observability outside of hook usage
- Core logic extraction for reuse outside of React
- Devtools now share the same repo/package
- Cache Persistence to localstorage (experimental)