Skip to content

React v0.14.5: setState doesn't work for Shallow Render #5779

@alexeyraspopov

Description

@alexeyraspopov

You can use this gist for reproducing the issue.

For the 1st test:

I want to make an async request when component is going to be mounted and use the result of a request for updating state. As you will see in test report, it doesn't happen.

For the 2nd test:

I believe this issue was fixed recently, in 0.14.3. Shallow Render can't recognize sync state updates.

Please tell me if you see any mistakes in my code, because I was trying to fix these problems in many ways. I hope example code is simple enough.

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