M
M
movsumlu2021-02-15 14:49:53
Vue.js
movsumlu, 2021-02-15 14:49:53

VueJS - how can I pass data from slot-a to the parent component?

Hello everyone,
how can I pass data from a slot (which is a component) to a parent component without emits and stores?
602a5fccd715b050280731.png

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
Rsa97, 2021-02-15
@movsumlu

No way. Data is only passed from parent to child.
But you can make it easier to emit back by using .sync and the update event:
https://medium.com/front-end-weekly/vues-v-model-d...

D
Dmitry Barkowski, 2021-02-22
@TypeOFF

https://en.vuejs.org/v2/guide/components-slots.htm...
Use slot-props

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question