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
The example is using a build of the latest master branch as it relies on a commit that went in yesterday . I'm unclear whether there's a better way to report problems against the latest master.
The second 'pre' watcher isn't called until after render.
Why do you need a watcher that runs before render?
The example is for illustration only. I've explained in greater detail here why this is important in real applications.
Why not use flush: 'sync' on that second watcher?
In this simple example that would work.
But using 'sync' brings its own problems, such as those discussed in #1763. If the watcher were watching a computed property that also depended on props it wouldn't be viable to use 'sync'.
The text was updated successfully, but these errors were encountered:
Version
master
at commit 11ed210The example is using a build of the latest
master
branch as it relies on a commit that went in yesterday . I'm unclear whether there's a better way to report problems against the latestmaster
.Reproduction link
https://codesandbox.io/s/holy-sunset-fc8di?file=/index.html
Steps to reproduce
otherValue
isn't called until afterrender
, despite beingflush: 'pre'
.What is expected?
Changes made by a
'pre'
watcher should trigger other'pre'
watchers prior to any rendering.In Vue 2 this kind of watcher chaining worked fine, see:
https://jsfiddle.net/skirtle/vnkxz35p/9/
What is actually happening?
The second
'pre'
watcher isn't called until afterrender
.Why do you need a watcher that runs before
render
?The example is for illustration only. I've explained in greater detail here why this is important in real applications.
Why not use
flush: 'sync'
on that second watcher?In this simple example that would work.
But using
'sync'
brings its own problems, such as those discussed in #1763. If the watcher were watching acomputed
property that also depended on props it wouldn't be viable to use'sync'
.The text was updated successfully, but these errors were encountered: