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

Mention the need to use Suspense #25

Open
linde12 opened this issue Mar 11, 2022 · 0 comments
Open

Mention the need to use Suspense #25

linde12 opened this issue Mar 11, 2022 · 0 comments
Labels
help wanted [Contribution] Extra attention is needed investigation [Issue] The Storyblok team is investigating

Comments

@linde12
Copy link

linde12 commented Mar 11, 2022

Hey!

Maybe we can mention the need to use Suspense for this to work? I haven't worked with Vue in a very long time and didn't know about the suspense API, so when i tried to use the useStoryblok hook nothing got rendered because i hadn't wrapped my component with Suspense.

I don't see why using Suspense is required, i think the useStoryblok hook could be redesigned to initially return null and once data has fetched return the actual data (as you would with e.g. useEffect in react) but now we're relying on experimental functionality and it is not documented.

So my suggestion is to either mention the need of the experimental Suspense component or make it work without using Suspense which should be a fairly quick fix.

@Dawntraoz Dawntraoz added help wanted [Contribution] Extra attention is needed investigation [Issue] The Storyblok team is investigating labels Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted [Contribution] Extra attention is needed investigation [Issue] The Storyblok team is investigating
Projects
None yet
Development

No branches or pull requests

2 participants