Skip to content

Too easy to create infinite loops #52

Description

@maddie927

Due to React using shallow reference equality, it's a bit too easy to cause infinite loops by putting something like a Maybe in your component state and rebuilding it in an unconditional setState inside receiveProps.

Possible fixes:

  • just revert the 2.0.1 change, findDOMNode will be slightly risky if not used within a setStateThen callback but this is a bit of an edge case anyway
  • expire the slightly overloaded receiveProps, using optional lifecycle hooks instead (bigger API change)
  • something else I'm not thinking of?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions