Skip to content

infinite loops still possible despite prop checks #87

@mattearnshaw

Description

@mattearnshaw

the README example code for onUpdate hangs when transplanted into my project. the reason being simply that in general {a:1} === {a:1} evaluates to false. It looks like a good option would be to extirpate these fudged "shouldUpdate?" conditions from componentWillUpdate altogether and change PlotlyComponent to a PureComponent. Verbatim this doesn't quite do the trick: I think .then(() => this.figureCallback(nextProps.onUpdate)) needs to go somewhere else too, but I haven't figured it out.

related #77

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