Hello! I am wondering if there is a way to set a slot on a text element that is nested deep within several components and still access that prop without having to set props for each component layer.
If that doesn’t make sense please let me know and I can give an example. Thanks!
So I have a parent component and want to set a slot for the parent component that can access a text element that is nested within several components
I don’t think you can without adding props to the whole tree of components
That is unfortunate. Would love to see that added as a feature. Would be extremely useful
With code components, you could have a component that would expose some props to its children via context
I have it set up where I fetch data from my db, then map that data to product cards. It’s just a bit messy with having slots nested inside each other