Redirect with noThrow fails when loaded repeatedly in a short time
ManishaA08 opened this issue · comments
Description:
Please consider that:
Home is a Link to path = "/"
Redirect redirects the page to "/home/door" when the link = "/"
When Redirect with noThrow is invoked several times for eg by clicking on a Link component "HOME" repeatedly, at times during DOM reconciliation the Redirect component is not unmounted, but the URL has changed to reflect that of the Link ("/"). Since Redirect with noThrow works by navigating to the redirect path on componentDidMount further clicks on Home will not redirect.
Reproduction: https://codesandbox.io/s/reach-router-with-nothrow-fails-on-repeated-clicks-osqt8
Steps:
- Open the codesandbox
- Click on Home several times
NOTE: This issue is not consistently reproducible.
Workaround:
- Unmount Redirect by navigating to some other path
- Remove noThrow