Skip to content

V3 Umbrella Issue #772

@tannerlinsley

Description

@tannerlinsley

Below are the official breaking changes and features for v3. If you have a feature request or idea, please use the Discussions tab to open a new discussion about that idea.

Global:

  • Remove usePaginatedQuery.
  • Remove ReactQueryConfig.shared as it only contains one value.
  • Change QueryConfig.enabled type to boolean but keep behavior.
  • Change query key type to match with documentation (string | any[]).
  • Remove react-query.mjs in favor of unbundled ESM files.
  • QueryCache and Query async methods should throw and hook methods should not.

Query:

  • Rename clear() to remove().
  • Remove refetch() in favor of QueryObserver.refetch(). The refetch() method on Query is redundant as the functionality is the same as fetch().
  • Remove subscribe() as it is only used in the tests.
  • Remove fetchMoreVariable argument from fetchMore() in favor of FetchMoreOptions.

QueryCache:

  • Remove global query cache.
  • Remove makeQueryCache in favor of new QueryCache().
  • Remove resetErrorBoundaries().
  • Remove prefetch() options (force/throwOnError).
  • Rename prefetchQuery() to fetchQuery().
  • Change isFetching to isFetching() and do not store state.
  • Remove true predicate option from getQueries() in favor of undefined.

ReactQueryCacheProvider

  • Make usage required. (Non-breaking, documented)
  • Do not create query cache automatically.

QueryObserver:

  • Rename clear() to remove(). (Non-breaking deprecation)

Query Config:

  • Remove forceFetchOnMount.
  • Change refetchOnMount false behavior to disable refetch on mount for that specific hook

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requesthelp wantedExtra attention is neededv3

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions