-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🐛 Prevents Setting from registering a dependency #4081
Conversation
@ekwoka do you know which PR or commit broke this in 3.13.6? I will forward this on to Caleb to have a look. |
Sadly, it was mine, about class methods. |
@ekwoka all good! Ok thanks for this, I will see if Caleb can have a look 🙂 |
There is an alternative approach, which would be using That could be more explicit about the lack of tracking on everything except the Oh wait, vue reactivity doesn't have |
Thanks @ekwoka |
@joshhanley @calebporzio 3.13.6 is not marked deprecated on npm, I'd recommend deprecating it (https://docs.npmjs.com/cli/v10/commands/npm-deprecate) to indicate to those using or trying to use it that they should use the newer one. Would be smart to do any time a bug is introduced :) |
Apprently, internally Vue reacitivity would register a tracking on the key if the key was checked using Reflect.has, while
getOwnProperty
would not.This using
getOwnProperty
first to prevent tracking on own properties, then uses Reflect.get to check for class methods.That's a bit unexpected. 😢
but now at least there is a test for this case.
After this is pushed and released (as this is a pretty critical bug) 3.13.6 should probably be yanked/deprecated on npm.
Playground for reference of :
3.13.5
3.13.6
In the first you can see that clicking the button changes the button to clicked, while the second, the effect will run again and overwrite the change from clicked.