Skip to content

Support react-query v5 #88

@Tbaut

Description

@Tbaut

Describe the bug
react-query-subscription doesn't support react-query v5, see error below "No matching export for import "hashQueryKey""
Indeed, it has been renamed to hashKey see https://tanstack.com/query/latest/docs/framework/react/guides/migrating-to-v5#hashquerykey-has-been-renamed-to-hashkey
To Reproduce
Steps to reproduce the behavior:

  1. Use react-query-subscription together with react-query v5

Expected behavior
No error

Screenshots / Error

There's an error at compilation

✘ [ERROR] No matching export in "../../node_modules/@tanstack/react-query/build/modern/index.js" for import "hashQueryKey"

    ../../node_modules/react-query-subscription/es/use-infinite-subscription.js:3:9:
      3 │ import { hashQueryKey, useInfiniteQuery, useQueryClient } from '@tanstack/react-query';

Context (please complete the following information):

  • Node version: v20
  • React Query version: 5
  • OS: Ubuntu
  • Browser: any

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions