Skip to content

fix(types): export FetcherResponse type #4139

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Conqxeror
Copy link

This PR exports the FetcherResponse type from the main swr package.
Currently, FetcherResponse is only accessible via swr/_internal, which is not intended for public consumption.
This change allows developers to properly type preload function returns without relying on internal imports.

Fixes #3038

@Conqxeror Conqxeror requested review from shuding and huozhi as code owners June 28, 2025 23:07
Copy link

codesandbox-ci bot commented Jun 28, 2025

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

When `fallbackData` is provided, `isLoading` should not be true initially.
Instead, `isValidating` should be true to indicate background revalidation.
This prevents a "flash of skeleton" UI when initial data is available.

Fixes vercel#3046
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FetcherResponse not exported
1 participant