Subscribe on changes!

The virtual node of each element in the development environment is not updated

avatar
Jan 20th 2021

Version

3.0.5

Reproduction link

https://jsfiddle.net/tzhbwvjy/4/

Steps to reproduce

What is expected?

Console output should be false

What is actually happening?

Output true


const patchElement = ( n1: VNode, n2: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, optimized: boolean ) => { const el = (n2.el = n1.el!) if (DEV || FEATURE_PROD_DEVTOOLS) { el.__vnode = n2 } ......

avatar
Jan 20th 2021
let a = {}
let b = a

expect(a === b).toBe(true)
avatar
Jan 20th 2021

When the component is updated,n1 is not equal to n2

avatar
Jan 20th 2021

You shouldn't rely on __vnode as it's internal

avatar
Jan 20th 2021

When the component is updated,n1 is not equal to n2

reference