Skip to content
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

feat: add name export for useSWR #2546

Closed
wants to merge 2 commits into from
Closed

feat: add name export for useSWR #2546

wants to merge 2 commits into from

Conversation

Innei
Copy link

@Innei Innei commented Apr 6, 2023

Add name export for useSWR, to improve auto import this hook by tsserver.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 6, 2023

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.

Latest deployment of this branch, based on commit a10937d:

Sandbox Source
SWR-Basic Configuration
SWR-States Configuration
SWR-Infinite Configuration
SWR-SSR Configuration

@drewtiktok
Copy link

This would be a great addition

@Innei
Copy link
Author

Innei commented Apr 12, 2023

@shuding This PR has been open for a while. Can it be reviewed and merged? It conforms to the project's code style and quality standards, and does not introduce new bugs or break existing functionality.

@promer94
Copy link
Collaborator

promer94 commented Apr 12, 2023

Thanks for your PR ! But this problem is more than just change some code and need more discussions around it

We have similar pr at #1889.

Pros

Concerns

  • Should we also do this for useSWRImmutable useSWRInfinite useSWRSubscription useSWRMutation ?
  • Once either of these needs to be removed that gonna be a breaking change.
  • How should we write documentation and examples for this to avoid confusion.

would love to hear your thoughts about these concerns.

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.

4 participants