Skip to content

Attempt to watch an element of a reactive object throws an error #886

@danyadev

Description

@danyadev

Version

3.0.0-alpha.10

Reproduction link

https://jsfiddle.net/qcom4adj/

Steps to reproduce

  1. Create a reactive object (const state = reactive({ hasUsers: false }))
  2. Start watching the key in this object (watch(state.hasUsers, () => { ... }))

What is expected?

Message in the console:
key 'hasUsers' has been changed!

What is actually happening?

Message in the console:
[Vue warn]: Unhandled error during execution of watcher getter
TypeError: fn is not a function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions