Skip to content

Data property read in prop watch treated as a rendering dependency #2728

Closed
@skirtles-code

Description

@skirtles-code

Version

3.0.4

Reproduction link

https://jsfiddle.net/skirtle/yuq96a0c/

Steps to reproduce

  1. Click 'Button 1'.
  2. Click 'Button 2'.
  3. Note the logging.

What is expected?

Clicking 'Button 2' should not cause anything to be logged.

What is actually happening?

Clicking 'Button 2' is logging a message, indicating that the component has re-rendered.


Clicking the first button causes a prop to change, triggering the watcher. The watcher accesses a property, which is then incorrectly tracked as a rendering dependency.

I reported this previously as part of #2521 but it was only partially fixed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.🐞 bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions