Skip to content

When using useSWRImmutable, there were multiple repeated requests to the interface during the global configuration of refreshIntervall #4207

@czfadmin

Description

@czfadmin

Bug report

Description / Observed Behavior

When the refreshIntervalparameter is explicitly customized in the global configuration, useSWRImmutable continues to refresh the request data in the background. This behavior raises uncertainty regarding whether it constitutes a bug or reflects a potential misunderstanding of the intended usage of the useSWRImmutable hook.

Image Image

Expected Behavior

When using the refershInterval configuration and simultaneously applying useSWRImmutable, interface data will not be automatically requested at regular intervals

Repro Steps / Code Example

https://codesandbox.io/p/sandbox/pkzpml

Additional Context

SWR version. 2.3.8
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions