Skip to content

useSWRInfinite, doesn't revalidate cache when the component is mount #1804

@alefseen

Description

@alefseen

Bug report

Description / Observed Behavior

the useSWRInfinite takes in revalidateOnMount config but does not revalidate cache when the component is mounted

Config used:

{
    revalidateFirstPage: false,
    revalidateOnMount: true,
}

Expected Behavior

When the component is mounted, useSWRInfinite revalidate the cache of the first page

Repro Steps / Code Example

sandbox link

Additional Context

SWR version. 1.1.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: paginationPagination related issuesbugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions