Skip to content
This repository was archived by the owner on Oct 26, 2018. It is now read-only.
This repository was archived by the owner on Oct 26, 2018. It is now read-only.

Infinite loop when dispatching redirect from within a componentWillReceiveProps #212

Closed
@mattkrick

Description

@mattkrick

if I dispatch a push or replace from within a componentWillReceiveProps, it causes that component to receive new props, making for an infinite loop (at least I think that's the process, chrome profiler stops after the first loop, so I haven't traced it entirely). Would it be possible to do something like save the location.key and if that key comes up twice in a row to just ignore the dispatch? Oddly enough, it doesn't happen if the redirect is to the /...

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