Skip to content

3.0.0-beta.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@liaoliao666 liaoliao666 released this 21 Nov 09:05
· 42 commits to main since this release

Breaking Changes

  • use fetcher instead of queryFn
  • remove exposed methods queryFn,queryKeyHashFn and getPrimaryKey

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.