Subscribe on changes!

default prop value returned from factory function is undefined

avatar
Sep 18th 2022

Vue version

3.2.39

Link to minimal reproduction

https://codesandbox.io/s/thirsty-rgb-bz54tf?file=/src/components/HelloWorld.vue

Steps to reproduce

check console in repropduction

What is expected?

From vue guide // Object or array defaults must be returned from // a factory function. The function receives the raw // props received by the component as the argument. props are there in argument but it seems they depend on the order which may be unexpected or undocumented.

What is actually happening?

prop is undefined

System Info

No response

Any additional comments?

No response

avatar
Sep 18th 2022

The function receives the raw props received by the component as the argument.

it receives the props they way there were passed from the parent - in which c was undefined.