Subscribe on changes!

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

avatar
Aug 28th 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.

avatar
Aug 28th 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

avatar
Aug 28th 2020

done

thanks for the awesome work!

avatar
Aug 28th 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).

avatar
Aug 29th 2020

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