Skip to content

fix(suspense): warn when using asnyc setup when not inside a Supsense boundary. (fix: #3659) #5565

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

Merged
merged 2 commits into from
Apr 13, 2022

Conversation

LinusBorg
Copy link
Member

We should warn users when they are using asnyc setup in a component that is not inside a Supsense boundary, because that component will now be stuck and never render.

Prior Art by https://github.com/HcySunYang in #3657

close #3649

… boundary.

Prior Art by https://github.com/HcySunYang in #3657

refactor: move warn code to more suitable location
@netlify
Copy link

netlify bot commented Mar 10, 2022

Deploy Preview for vue-next-template-explorer ready!

Name Link
🔨 Latest commit 48b1b1e
🔍 Latest deploy log https://app.netlify.com/sites/vue-next-template-explorer/deploys/625697f4cb5b260008e2661c
😎 Deploy Preview https://deploy-preview-5565--vue-next-template-explorer.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 10, 2022

Deploy Preview for vue-sfc-playground ready!

Name Link
🔨 Latest commit 48b1b1e
🔍 Latest deploy log https://app.netlify.com/sites/vue-sfc-playground/deploys/625697f4d146f50008d8fbfc
😎 Deploy Preview https://deploy-preview-5565--vue-sfc-playground.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@netlify
Copy link

netlify bot commented Mar 10, 2022

Deploy Preview for vuejs-coverage ready!

Name Link
🔨 Latest commit 48b1b1e
🔍 Latest deploy log https://app.netlify.com/sites/vuejs-coverage/deploys/625697f43c06170008630a11
😎 Deploy Preview https://deploy-preview-5565--vuejs-coverage.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@LinusBorg LinusBorg added 🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: suspense labels Mar 10, 2022
@LinusBorg LinusBorg requested a review from edison1105 March 10, 2022 17:25
@LinusBorg
Copy link
Member Author

Note: I noticed that there's a closed PR from @HcySunYang that basically does the same thing - can we just reopen that one? I would not mind. Not sure what the proper etiquette is for this case.

@HcySunYang
Copy link
Member

@LinusBorg Just use this PR, it's okay, great job.

@yyx990803 yyx990803 merged commit 053c65b into main Apr 13, 2022
@yyx990803 yyx990803 deleted the linusborg/warn-missing-suspense-boundary branch April 13, 2022 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔨 p3-minor-bug Priority 3: this fixes a bug, but is an edge case that only affects very specific usage. scope: suspense
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When the async keyword is used to declare the setup function, the template will not be rendered
4 participants