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
That issue mentions the possibility of an RFC but as far as I'm aware that hasn't happened. I'm unclear what the current plan is regarding backwards compatibility with Vue 2 for this feature.
If the plan is to abandon the use of $refs arrays within v-for then this should be mentioned in the migration guide. There are also various references to the old behaviour within the current documentation.
On a related note, it's also unclear what the expectation is with regards to using ref inside a scoped slot. Scoped slots have a similar problem to v-for in that they can create multiple nodes with the same ref. I don't think the example of using a ref function with v-for would work with a scoped slot as it relies on onBeforeUpdate running on the parent. It would be good to get something on this topic somewhere in the documentation, even if only to set expectations and discourage misuse.
The text was updated successfully, but these errors were encountered:
In Vue 2, if a
ref
attribute was used inside av-for
it would result in an array inside$refs
.However, this is not currently true in Vue 3 rc.5. This appears to be by design, see:
vuejs/core#1166
That issue mentions the possibility of an RFC but as far as I'm aware that hasn't happened. I'm unclear what the current plan is regarding backwards compatibility with Vue 2 for this feature.
If the plan is to abandon the use of
$refs
arrays withinv-for
then this should be mentioned in the migration guide. There are also various references to the old behaviour within the current documentation.On a related note, it's also unclear what the expectation is with regards to using
ref
inside a scoped slot. Scoped slots have a similar problem tov-for
in that they can create multiple nodes with the sameref
. I don't think the example of using aref
function withv-for
would work with a scoped slot as it relies ononBeforeUpdate
running on the parent. It would be good to get something on this topic somewhere in the documentation, even if only to set expectations and discourage misuse.The text was updated successfully, but these errors were encountered: