Skip to content

v2.20.1 has a breaking change to invalidateQueries #1051

@hugo-advizr

Description

@hugo-advizr

Describe the bug
Since v2.20.1 the enabled flag of the queries isn't respected when invalidated.

To Reproduce
Steps to reproduce the behavior:

  1. Invalidate a query with enabled = false
  2. Since v2.20.1 the query is refetched

Expected behavior
The queries shouldn't be refetched if enabled is falsy.

Smartphone:

  • Device: iOS Simulator
  • Version: 2.20.1

Additional context
I believe the breaking change is here: https://github.com/tannerlinsley/react-query/compare/v2.20.0...v2.20.1#diff-bb9128e7de98a752e865baad7b27ee3bL199 (the markdown url expansion breaks the link)

Thank you in advance for any help and for this great library!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions