3.0.0-beta.0
Pre-release
Pre-release
Breaking Changes
- use
fetcher
instead ofqueryFn
- remove exposed methods
queryFn
,queryKeyHashFn
andgetPrimaryKey
Migration
Upgrading from ReactQueryKit 2 → ReactQueryKit 3
createQuery({
- primaryKey: 'posts',
- queryFn: ({ queryKey: [_primaryKey, variables] }) => {},
+ queryKey: ['posts'],
+ fetcher: variables => {},
})
What you benefit from ReactQueryKit 3
- Support hierarchical key
- Support infer the types of fetcher, you can enjoy the preferred types automatically.
You can see the v3 docs here: https://github.com/liaoliao666/react-query-kit/tree/v3#readme.