Skip to content

setProps doesn't update props in some circumstances #738

Closed
@TheCycoONE

Description

@TheCycoONE

Version

1.0.0-beta.19

Reproduction link

https://codesandbox.io/s/1k6y65wp4

Steps to reproduce

Create a component, like the one in the above reproduction, with multiple properties that are watched.
It is important that the watch function reads one of the properties (i.e. if you remove that switch statement from my test case the problem doesn't happen.)
Create a test for that component, call setProps on the property that is read in the watch.

What is expected?

The property should be updated, the component should react to the updated property

What is actually happening?

The property is never updated. props() shows the old value.

Note: this is a regression, it worked correctly in 1.0.0-beta.16 (I did not try other versions)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions