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
setup(){constprice=ref(10);consthistory=ref<Array<string>>([]);watchEffect(()=>{history.value.push(`Price changed to ${price.value}`);});return{ price, history };}
What is expected?
In rc.10, it only displays one change when initialised (Price changed to 10)
What is actually happening?
In rc.11, it displays this change twice.
The text was updated successfully, but these errors were encountered:
As a supplement to what @HcySunYang pointed out, calling some methods can both trigger and track in one effect, which can lead to an infinite recursion in some scenarios.
e.g. Array.prototype.push, gets .length and sets values,
Version
3.0.0-rc.11
Reproduction link
https://jsfiddle.net/qrh0ubaj/
Steps to reproduce
Consider this component
What is expected?
In rc.10, it only displays one change when initialised (
Price changed to 10
)What is actually happening?
In rc.11, it displays this change twice.
The text was updated successfully, but these errors were encountered: