Skip to content

Document that syncing props and state is usually a bad idea #337

Open
@gaearon

Description

We used to have a "tip" about this on the old website (a few years ago), but not anymore.

I think maybe we need to revive that section because too many people attempt to derive state from props—either in constructor or cWRP—without realizing they could just do this work in render. In 90% of cases that's exactly what they need to do.

See also https://mobile.twitter.com/EntriaTech/status/934139022204653569.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions