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

breaking: Throw error when using suspense on the server side without fallback in React 18 #1931

Merged
merged 2 commits into from Apr 19, 2022

Conversation

shuding
Copy link
Member

@shuding shuding commented Apr 16, 2022

Close #1841, close #1832.

More discussions can be found here. In short, libraries like SWR should not support fetching data on the server side as of today.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Apr 16, 2022

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 a4525fd:

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

@shuding shuding marked this pull request as ready for review April 16, 2022 22:47
@shuding shuding requested a review from huozhi as a code owner April 16, 2022 22:47
src/use-swr.ts Show resolved Hide resolved
src/use-swr.ts Outdated Show resolved Hide resolved
@shuding shuding merged commit dc78549 into main Apr 19, 2022
@shuding shuding deleted the shu/6207 branch April 19, 2022 08:40
himanshiLt pushed a commit to himanshiLt/swr that referenced this pull request Apr 26, 2022
@koba04 koba04 mentioned this pull request Aug 5, 2022
13 tasks
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.

SWR should throw when trying to suspend on the server
2 participants