Migrate TanStack Query imports
- We recommend upgrading to
@tanstack/react-query@5when using@suspensive/react-querywith@tanstack/react-query@4. - Starting from
@suspensive/react-query-4@3.3.0,queryOptions,infiniteQueryOption,useSuspenseQuery, anduseSuspenseQuerieshave been deprecated. (@tanstack/react-query@4.40.0officially supportsuseSuspenseQueryandqueryOptions.)
Any API in @suspensive/react-query that is officially provided by @tanstack/react-query will be marked as deprecated.
This is because @suspensive/react-query offers the same APIs such as Suspense Hooks and queryOptions/infiniteQueryOption, and we want to encourage developers to use the official @tanstack/react-query APIs first.
Terminal
npx @suspensive/codemods tanstack-query-import .This codemod automatically transforms import paths from @suspensive/react-query to @tanstack/react-query.
For example:
import { queryOptions } from '@suspensive/react-query'
import { useSuspenseQuery } from '@suspensive/react-query-5' // The versioned package is also transformed!Transforms into:
import { queryOptions } from '@tanstack/react-query'
import { useSuspenseQuery } from '@tanstack/react-query'Last updated on