Slot is not working properly

Okay Im pissed already damn,
This slot thing is not working properly dont know why,
At first it was working then when the app is restarted it got being destroy dont know, this is not happening when using Plian VueJS

So here the thing the activeIndex is come and out, dont know why
Also I guessing Im using it properly, it was working, Yes it was, but when running ionic server or sort of refreshing the web browser in a hard way, there is an error will occur.
image


image

Hey there! Sorry to hear you’re upset.

Looking at the error message, it looks like the "{activeIndex}" bit is the problem. the {} seem to be making vue think it needs to destructure that property from the components data. can you try

<form-wizard v-slot:default="activeIndex">

If that doesn’t work, could you provide a sample project to inspect?

1 Like

Hi thank you,
Sorry for the ranting, I was just too frustrated cause I didnt make it work but in the end it is on my part who doest understand the error message.

Thanks mate, it works well now, I guess destructure should not be in use in slot, or the implementation on slot scope I use is not right.

Can you suggest the best way on how to implement slot scope?
and now Im having new error, why is it the scope slot sets to undefined? this happen when I rerun the application (ionic serve)
image

The only thing to make this scope property working is to have a (props||{})

Do you have a more complete example?

A quick work-around would be to wrap the parent component in a v-if to check if props are set first.

1 Like

hhhmmm sound right, thank you :slight_smile: