Using slots or render functions to proxy rendering preserving reactivity #12331
Unanswered
hypeJunction
asked this question in
Help/Questions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to enable a type of composition that would not require passing down props endlessly through slot templates, making it really difficult to achieve type-safety and requiring generics.
So, instead of:
I would like to pass a render function:
The problem with the latter however is that if I take the default slot from inside
TableItem
, push it into some stack inside a ref provided by theTable
, and then invoke the slot insideTable
template, the content of the rendered items is not reactive.My expectation was that a reactive change in any of the children would bubble up to the top, but it seems that reactivity is based on props and because the
TableItem
does not accept any props, nothing ever gets rerendered.Beta Was this translation helpful? Give feedback.
All reactions