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

Can I use async setup with Suspense instead of serverPrefetch? #8

Closed
yaquawa opened this issue Mar 11, 2021 · 1 comment
Closed

Can I use async setup with Suspense instead of serverPrefetch? #8

yaquawa opened this issue Mar 11, 2021 · 1 comment

Comments

@yaquawa
Copy link

yaquawa commented Mar 11, 2021

Hi, thanks for all the efforts to create this project !!!

I noticed that Support Suspense in SSR was possible in vue3.
Does this mean I can use fetch data in async setup instead of serverPrefetch ?
I didn't see any example code in the readme shows how to use this plugins with the vue3's setup method, so if I'm wrong would you show me an example that works with the setup method?

Thanks a lot!

@yaquawa yaquawa changed the title Can I use async setup with Suspense instead of serverPrefetch Can I use async setup with Suspense instead of serverPrefetch? Mar 11, 2021
@frandiox
Copy link
Owner

@yaquawa Hi! I just added a quick example in the previous commit. The tricky part is the change to the root component to use suspense.

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

No branches or pull requests

2 participants