`renderSuspended` does not provide the values returned from `setup` to the template
obulat opened this issue · comments
Olga Bulat commented
Environment
Nuxt project info:
- Operating System: Linux
- Node Version: v18.18.0
- Nuxt Version: 3.9.3
- CLI Version: 3.10.0
- Nitro Version: 2.8.1
- Package Manager: npm@10.2.3
- Builder: -
- User Config: devtools, modules
- Runtime Modules: @nuxt/test-utils/module@3.10.0
- Build Modules: -
Reproduction
https://stackblitz.com/edit/github-7wbhms?file=test%2Ftest-component.spec.ts
Describe the bug
renderSuspended
does not pass the values from setup
function (not the <script setup>
) to the template
. The mountSuspended
works fine.
Additional context
In the Openverse Nuxt 3 migration PR, I replaced render(renderContext, ...args)
with render(_ctx, ...args)
on this line:
test-utils/src/runtime-utils/render.ts
Line 113 in bc86d23
which seems to fix the issue.
Logs
No response
Joao Vitor Alves commented
This is because of defineComponent wrapper
I opened a PR to fix this #852