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
import{reactive,shallowReactive,watchEffect}from'vue'consta={name: 'rakiyu',friends: ['friend1']}constsa=shallowReactive(a)constra=reactive(a)console.log(sa===ra)// true, the reactive status depending on reactive or shallowReactive which run first, the === will always trueconstf=ra.friendswatchEffect(()=>{console.log(...f)})ra.friends.push('friend2')// will not triger console.log
What is expected?
log out friend2
What is actually happening?
not log
The text was updated successfully, but these errors were encountered:
Akimotorakiyu
changed the title
the reactive and shallowReactive shield each other, so code not work as expect
the reactive and the shallowReactive shield each other, so code not work as expect
Feb 6, 2021
Version
3.0.5
Steps to reproduce
What is expected?
log out friend2
What is actually happening?
not log
The text was updated successfully, but these errors were encountered: