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
Description
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
Labels
No labels