Subscribe on changes!

组件style为对象时,父元素重新渲染,style对象地址改变(样式未变化),子组件会重新渲染

avatar
Jan 20th 2023

You are recreating a new object for style on every re-render of the parent, and the parent re-renders on each change of count.

This is expected in Vue 3, where applying fallthrough attributes is left to the child instead of being done by the parent.