Skip to content
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

Docs should be clearer about watch option keys not supporting key paths #2003

Closed
DanielAsher opened this issue Aug 28, 2020 · 4 comments
Closed

Comments

@DanielAsher
Copy link

DanielAsher commented Aug 28, 2020

Version

3.0.0-rc.9

Reproduction link

https://jsfiddle.net/oekwvhd4/

Steps to reproduce

Migrate a v2 app to v3 with a component that uses a watch option with a key path.

What is expected?

The docs clearly state that watch options no longer support key expressions.

Clear migration guidance should be given about moving watched keypaths to mounted this.$watch(() => this.key.path, () => doSomething())

What is actually happening?

This is a significant (and silent!) breaking change, but the docs still refer to key expressions.

@Ydot19
Copy link

Ydot19 commented Aug 28, 2020

If this is a documentation issue, I feel it's best for you to report at docs-next because that's the repo that deals with the migration guide

@yyx990803 yyx990803 reopened this Aug 28, 2020
@DanielAsher
Copy link
Author

done

thanks for the awesome work!

@CyberAP
Copy link
Contributor

CyberAP commented Aug 28, 2020

It's strange that it didn't go through an RFC process. I can understand removing it from the $watch function, but removing it from the watch option doesn't look like an improvement to me (you'll have to create a computed for that watcher to work now).

@skirtles-code
Copy link
Contributor

This was mentioned briefly in #671 but it looks like it got lost in the subsequent discussion about potential changes to immediate.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants