feat(core): respect $stable slots flag per RFC

This commit is contained in:
Evan You
2019-11-26 10:03:36 -05:00
parent 009dc80674
commit 43097987cf
3 changed files with 52 additions and 2 deletions

View File

@@ -138,7 +138,9 @@ export function shouldUpdateComponent(
// this path is only taken by manually written render functions
// so presence of any children leads to a forced update
if (prevChildren != null || nextChildren != null) {
return true
if (nextChildren == null || !(nextChildren as any).$stable) {
return true
}
}
if (prevProps === nextProps) {
return false