Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SWRConfig fetcher does not pass down to useSWRInfinite #2349

Closed
demosofa opened this issue Jan 5, 2023 · 0 comments
Closed

SWRConfig fetcher does not pass down to useSWRInfinite #2349

demosofa opened this issue Jan 5, 2023 · 0 comments

Comments

@demosofa
Copy link

demosofa commented Jan 5, 2023

Bug report

Description / Observed Behavior

I have read and applied the Global Configuration example with SWRConfig and the fetcher. I noticed that useSWR hook works fine without fetcher parameters but useSWRInfinite hook does not

Expected Behavior

the official doc stated that The context SWRConfig can provide global configurations (options) for all SWR hooks

Repro Steps / Code Example

//this works
const { data, errorr } = useSWR(url)
//this doesn't work
const { data, error } = useSWRInfinite(url)
//this work
import { fetcher } from "./contexts/SWRContext"
const { data, error } = useSWRInfinite(url, fetcher)

Additional Context

SWR version 2.0.0.
Maybe relating to this issues #1899

@demosofa demosofa changed the title SWRConfig fetcher not work with useSWRInfinite SWRConfig fetcher does not pass down to useSWRInfinite Jan 5, 2023
@vercel vercel locked and limited conversation to collaborators Jan 24, 2023
@koba04 koba04 converted this issue into discussion #2377 Jan 24, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant