Closed
Description
Version
3.0.2
Reproduction link
https://jsfiddle.net/h8k7rp45/1/
Steps to reproduce
just click the text Hello Vuejs
, then look at the console, it will output undefined
once, then after 1 second, output hehe0
. If I remove the setTimeout
, the hehe0
will never output
What is expected?
output hehe0
when CompA mounted
What is actually happening?
not output hehe0
when CompA mounted
it mainly because watch & watchEffect push preJobs
, and ref.value = element
worked at queue jobs
(the middle), when push preJobs
, it's still flushing, so it will not flush again. And after postEffects, no queue jobs
and postEffects
add, it won't run preJobs
again.
Metadata
Metadata
Assignees
Labels
No labels