Subscribe on changes!

Props inheritance doesn't work in some cases, when proxy component also has some props

avatar
Oct 26th 2021

Version

3.2.20

Reproduction link

sfc.vuejs.org/

Steps to reproduce

  1. create a component with some props (can be empty)
  2. as a root node, use another component with different props
  3. use somewhere component from step 1 with props from a component created in step 2
  4. start from ref/computed with value undefined, then update it

What is expected?

It always gets updated in the lowest level component that supports the given prop.

What is actually happening?

when the prop value is initially undefined, it's not propagated inherited to the lower-level components.

Workarounds

workaround 1: make sure that the initial value is not undefined workaround 2: make sure that the intermediate component doesn't have any props.


I found this issue while working on my project in Vite. Weirdly, it works fine in dev mode, and the only problem is production!