You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When changed the propData.value, child component watch(props.propData) will not watch it change.
But template rerender correctly. and watch a getter watch(()=>props.propData) will take effect.
What is expected?
When propData changed, watch(props.propData) will watched this change, same as tamplate rerender and watch(()=>props.propData)
What is actually happening?
When propData changed, watch(props.propData) not take effect.
When clicked the changeProps1 button,then click changeProps2 will also invalid
System Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered:
if(isRef(source)){getter=()=>source.valueforceTrigger=isShallow(source)}elseif(isReactive(source)){getter=()=>reactiveGetter(source)forceTrigger=true}elseif(isArray(source)){isMultiSource=trueforceTrigger=source.some(s=>isReactive(s)||isShallow(s))getter=()=>source.map(s=>{if(isRef(s)){returns.value}elseif(isReactive(s)){returnreactiveGetter(s)}elseif(isFunction(s)){returncallWithErrorHandling(s,instance,ErrorCodes.WATCH_GETTER)}else{__DEV__&&warnInvalidSource(s)}})}elseif(isFunction(source)){if(cb){// getter with cbgetter=()=>callWithErrorHandling(source,instance,ErrorCodes.WATCH_GETTER)
But I saw it will all convert to getter anyway, is there anything I missed?
Vue version
3.4.21
Link to minimal reproduction
Playground reproduction
Steps to reproduce
Child.vue
, define a props meanspropData
, type isPropData
propData.value
, child componentwatch(props.propData)
will not watch it change.But template rerender correctly. and watch a getter
watch(()=>props.propData)
will take effect.What is expected?
When propData changed,
watch(props.propData)
will watched this change, same as tamplate rerender andwatch(()=>props.propData)
What is actually happening?
When propData changed,
watch(props.propData)
not take effect.When clicked the
changeProps1
button,then clickchangeProps2
will also invalidSystem Info
No response
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: