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(runtime-utils): expose setup context from renderSuspended result #852

Merged

Conversation

joaovitoras
Copy link
Contributor

@joaovitoras joaovitoras commented May 20, 2024

After a lot of internal testing in my private project and seeing some similar opened issues about the context returned by setup was not being accessible in the component, I saw that there was a difference in the way how mountSuspended and renderSuspended were defined.

In mountSuspended things always worked, looking at the difference between the two I ended up arriving at the PR danielroe/nuxt-vitest#391 which introduced a fix for this, but only on the mountSuspended function

It would be cool at some point to unify what is possible in these two functions. There is a lot of duplicated logic between both

Fix: #722

@joaovitoras joaovitoras marked this pull request as ready for review May 20, 2024 14:45
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. vitest-environment labels May 20, 2024
@joaovitoras joaovitoras changed the title Feature/define component with render suspended Fix setup context not defined when use renderSuspended May 20, 2024
@joaovitoras
Copy link
Contributor Author

@danielroe This PR is ready! Can you review this or assign someone?
I couldn't find contribution instructions for this repository and I don't know what steps to follow to get this work merged

@danielroe danielroe changed the title Fix setup context not defined when use renderSuspended fix(runtime-utils): expose setup context from renderSuspended result May 20, 2024
Copy link
Member

@danielroe danielroe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice - thank you! ❤️

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 20, 2024
@danielroe danielroe changed the title fix(runtime-utils): expose setup context from renderSuspended result feat(runtime-utils): expose setup context from renderSuspended result May 20, 2024
@danielroe danielroe merged commit 6ec39d4 into nuxt:main May 20, 2024
4 checks passed
@github-actions github-actions bot mentioned this pull request May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files. vitest-environment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

renderSuspended does not provide the values returned from setup to the template
2 participants