core
core copied to clipboard
Unexpected computed result when global reactive object tracked as a dependency
Vue version
3.4.*
Link to minimal reproduction
https://play.vuejs.org/#eNp9U11P2zAU/StX0aS0UpVoH0/QdmOIByYE09ieCJrS1GkNqR3ZTltU5b/vXDsJBTGe4txzfL98ziE6q+tk24joJJrawsjakRWuqeeZkptaG0cHMqKklkqjNxSDGg8QnetN3QFJyj+cKj7NVKbSlNxa4K5tKkfSks03gmRJhRG5w8nqCt8lGHnh5FaQXjyIwtHiiURZ4nRb6FqMnGnEOFOFVtZRXlU0435G8dnVVTxGpZ1US71LVpVe5AyCgihRpspGIbFWVKxztRKjMR0YACHZ5lUjArk/z2bkc9JXiq9vri9iOgmBTLU8zzQN68Fi8OPEpub28Uc0XTTOoc63opLF4yyLQsEsmofDNA2EQF6b8OV1pThO06Nk0SRyFrOWcpU8WK3wLL5p5ARdVsLc1DyTzaKTMA5jGEPvfvgYr2vSx4u1KB7fiD/YPcey6CeeR5gtWh0wl5uVcAG+uL0We5wHcKOXTQX2O+AvgYdtuMdA+96oJdo+4vluL72CpFr9thd7J5Tth+JGmdl6fhZBULyp/43+3O7n5Iu/h/fCFnsxvqdrXmkDCU5YURNCnvPGGKHcJbSWq0Ig2wvZQ1THOnwhPS/6Sjhk9eCQfQThzeZ0dz8+ZVXCFx2DZcxRRKSLLelHbw8GYRc2HRzBWUPNSlr3CdeGvBQS+1VwYSZ4vBc16qEgEQp02F2SJM/4PROOqu/WAmbp6vdlQhOogAxJo+xalm40+AYzMWiwWqM8B3to2ZeI953LYZ2zN5Y8YvaRWzE4VLnu7dpfTmqj90/Jh1KbQvypl/CLv4n3fs+aS7md+xa7M7cI+Ry6dbYtTVOOd5TXTu6agZWPC7809HD/lZcJMvy7FYalDRlCn8nnj1H7DwTt0sM=
Steps to reproduce
1, click change
2, check the list output
3, click forceUpdate can show the real value of list
What is expected?
click change will update global reactive obj: all; so component(Comp.vue) need to update. (list2 track all).
It work in 3.3.* .others, it just computed trigger this problem, ref is normal.
What is actually happening?
list not update.
System Info
No response
Any additional comments?
BTW, Although it is not recommended to modify the computed of coll in the computed list2 scope.
And, if it's not bug case, it needs to be explicitly reminded to developers at least during the development phase.