core
core copied to clipboard
fix(vMemo): prevent unexpected render in v-for + v-memo
This PR fixes the unexpected render when v-memo
is used in a keyed v-for
list. In the past, we just used an array as the renderCache
of a list whatever if it is keyed. This PR adds a map that uses nodes.key
as key and node
as the value to the cache. When updates, if a list is keyed, it will check the cache from the map, so that can prevent unexpected render.
close #10392