Is possible to have recurring slots?
Version
3.0.2
Reproduction link
https://github.com/devidwong/recurring-slot
Steps to reproduce
- create recurring component with two (same) slots - one under component itself's tag
- render component and pass expected recurring details you want to be redered x times deep with different properties( by replies in this example)
What is expected?
rendering data deeply like json provided
What is actually happening?
after second level nesting is lost. No error appears
Is this was ever possible? I see use case for this. (rendering comments without flatmapping and defining inside html just once)
I cannot see anything in docs, google. I've set issue in stackoverflow as well - no answer
I found an workaround solution - detailsComponent passed as prop. It's in updated repository.
I don't know why I needed to do it - version from first commit looks nicer. But I'm also satisfied with actual.
I'm closing. Maybe there will be someone searching for 'recurring slot vue'. Thank you
The repo he links to is Vue 2. It rather seems he missed to actually pass the parent slot to the child scoped slot.
An actual repo in Vue 3 would help.
Ups. My fault. I reproduced it in bigger app with vue 3. Here it's 2xx beacuse I used wrong Vue CLI option. Trust me it occurs the same in vue 3 - follow my commits. I spend whole day trying to archieve this. I don't have more time now to migrate. Providing details component as a prop for recursive component is ok for me - Just needed ONE place to do it. Thank you for checking. Feel free to continue. I will investigate later.
btw stackoverflow issue helped me https://stackoverflow.com/questions/64572235/is-possible-to-have-recurring-slots-in-vue