[✨] Allow attaching arbitrary data to JSX #147
Replies: 7 comments
-
|
Will this open the possibility that we can have "scoped slot" concept as well? :) |
Beta Was this translation helpful? Give feedback.
-
|
could you elaborate on what you mean by "scoped slot"?
…On Tue, Jul 18, 2023 at 1:50 AM Ahn ***@***.***> wrote:
Will this open the possibility that we can have "scoped slot" concept as
well? :)
—
Reply to this email directly, view it on GitHub
<https://github.com/BuilderIO/qwik/issues/4793#issuecomment-1639804849>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA3KT3BJX54ACOQKGNIFL3XQZE47ANCNFSM6AAAAAA2KWO5HQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Hi, What triggered me thinking into "scoped slot" was the I have pseudo codes like this It's just wild idea. Normally with I'm not sure if using |
Beta Was this translation helpful? Give feedback.
-
|
I believe your use case can be solved with |
Beta Was this translation helpful? Give feedback.
-
|
Indeed that is the existing way I can do. I was trying to see if there is a way to replicate what Vue has done. |
Beta Was this translation helpful? Give feedback.
-
|
We moved this issue to |
Beta Was this translation helpful? Give feedback.
-
|
very doable to implement, indeed a q:data prop on vnode that will be serialized as the state rootid of the object, and a qData function to retrieve the data. Not sure if the name is needed, I think it would be more flexible to allow storing any data? That saves a few bytes for every use, but requires more coordination between things that use the data. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Is your feature request related to a problem?
I would like to implement a popup component that shows additional data on hover. I would like the component to be generic and so the popup needs to get a hold of the rendering data and the rendering component in some way. I would like to attach that data to DOM/HTML
Describe the solution you'd like
The result of the above would attach the
[Detail, {name: 'Hello World'}]to the DOM ThePopUpcomponent could than retrieve itDescribe alternatives you've considered
Using constum events
The result of the above would attach the
[Detail, {name: 'Hello World'}]to the DOM ThePopUpcomponent could than retrieve itAdditional context
No response
Beta Was this translation helpful? Give feedback.
All reactions