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
Hi,
i would like to add the support of the html syntax to your package (it seems possible with blade)
the idea would be to use it like that (because i don't think we can override for sure the <x-slot></x-slot> parser before it occurs)
I would like to understand why you use this syntax : ($item) for the variables, i don't see any benefit and if we want to pass multiple variables we could pass an array in the call of the parent.
What kind of other variables do you need inside the scope ? Why can't we use the $component variable to access the parent component ? What is the benefit to add more things to pass thought ?
Thanks for your answers !
The text was updated successfully, but these errors were encountered:
Angelinsky7
changed the title
[Question] Some question about design
[Question] Some questions about design
Mar 18, 2021
Thanks for your interest in contributing to the package. It was created before the syntax of <x-slot> was introduced to Laravel. It would be great if the package could support the <x-scoped-slot> syntax as well, so you are willing to add it I would be happy. :)
Regarding your questions:
I did use that syntax to allow users to pass multiple variables to the slot. For example it can be used like this ($item, $odd = false) .
If you're thinking about the third, optional argument of scoped slot -- honestly I don't remember. :D I definitely had some use case for that back when I was creating this package but I had forgotten it by now. However I think it's a good thing to support anyway.
If you have further questions I'd be happy to answer them.
Thanks for your answer @konradkalemba
the first thing to note is that <x-scoped-slot> won't be possible, due to the fact that custom pre-compiler will trigger only after the <x-> blade syntax. (and thus create a ComponentNotFoundException)
so we must change this syntax and choose something else like : <ext-scoped-slot> or something like that. (ext for x-extention, for example).
What would be your preferences ?
Hi,
i would like to add the support of the html syntax to your package (it seems possible with blade)
the idea would be to use it like that (because i don't think we can override for sure the
<x-slot></x-slot>
parser before it occurs)to create this
so my questions :
Thanks for your answers !
The text was updated successfully, but these errors were encountered: