You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes there is a need to transfer a slot to the component, depending on the reactive value.
In the syntax of SFC templates, this can be done as follows:
<template>
<Comp>
<template #slotNamev-if="someReactiveVariable">
Slot value
</template>
</Comp>
</template>
But when I try to do something like this in JSX, it lose the ability to reactively control the transfer of the slot to the component:
Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
Make sure this is a Vite issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to vuejs/core instead.
Related plugins
plugin-vue
plugin-vue-jsx
Describe the bug
Sometimes there is a need to transfer a slot to the component, depending on the reactive value.
In the syntax of SFC templates, this can be done as follows:
But when I try to do something like this in JSX, it lose the ability to reactively control the transfer of the slot to the component:
What to do in such a situation?
Reproduction
https://stackblitz.com/edit/vitejs-vite-t9skwh?file=src%2FApp.tsx
Steps to reproduce
Click "Toggle useSlot" button
System Info
Used Package Manager
npm
Logs
No response
Validations
The text was updated successfully, but these errors were encountered: