Skip to content

[RTK-Query]: useQuery hook does not refetch after resetApiState (2) #3778

Closed
@manceauJb

Description

@manceauJb

Description:

This issue appears to be a bug in RTK-Query, which should have been resolved by #1735 and #3333. However, it appears that the problem persists.

Reproduction Steps:

  1. Access the following example showcasing the issue: CodeSandbox
  2. Click on the "Rerender Component" button.
  3. Click on the "Reset Api State" button.

Expected Behavior:

After clicking "Reset API State," the request should not remain stuck in a pending status. Instead, it should automatically re-fetch the query. Currently, the request remains pending until the component is re-rendered. Even if we attempt to manually refetch, the query is executed, but the result remains pending.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions