Closed tomasz-pucka closed 2 years ago
Stale issue message
Any updates on this issue?
The same problem.... got empty context.slots object when the slot was updated after mounted lifecycle. Using getCurrentInstance().vnode.componentInstance.$scopedSlots.default?.({}) can get the current slots content, but context.slots cannot
Version
1.4.9
Reproduction link
Vue 2 Comparison with Vue 3 If there are some issues with running the preview, try to refresh it using the refresh button in the console.
Steps to reproduce
Toggle the checkbox in the preview and observe the conditionally rendered content and slot objects values in the console. Try to change the initial
showSlots
value in theApp
component tofalse
and observe the difference.What is expected?
The
context.slots
property should be updated when slots are rendered conditionally and contain up-to-date value in theupdated
hook. Behaviour should be identical to the vue 3 example.What is actually happening?
The value of
context.slots
doesn't seem to be updated after component initialization.