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
Please describe what the rule should do:
Prevent using the watch function without a override. This can cause very subtle race conditions throughout your application.
What category should the rule belong to?
[ ] Enforces code style (layout)
[x] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
Not a maintainer, but I believe you should elaborate on said race conditions, because watch is quite fundamental to solving certain situations and the example you have provided is something that's perfectly safe to do.
I agree that watch is fundamental for many things. Another example I can give is having a ref with 2 watches that are async and the effect is calling a different API to update that ref at different times. These two API calls have different effects and someone can use a watch without thinking of the consequences of the side effects of a slower API doing something inappropriate to a ref on the page.
Please describe what the rule should do:
Prevent using the
watch
function without a override. This can cause very subtle race conditions throughout your application.What category should the rule belong to?
[ ] Enforces code style (layout)
[x] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
The text was updated successfully, but these errors were encountered: