Closed lostPixels closed 5 years ago
Can you provide a reproduction of this problem on Codesandbox?
Hi Tim,
I'm afraid the app in which this is occurring is not portable enough to reproduce easily. I can see if it happens in isolation too though.
On Thu, Jul 11, 2019 at 11:44 AM Tim Dorr notifications@github.com wrote:
Can you provide a reproduction of this problem on Codesandbox?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ReactTraining/react-router/issues/6828?email_source=notifications&email_token=AAT3VG26N3FGKFOX34IL753P65IOPA5CNFSM4IBKYB2KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZXDYCY#issuecomment-510540811, or mute the thread https://github.com/notifications/unsubscribe-auth/AAT3VG6PEQVMS22DEHMC3QTP65IOPANCNFSM4IBKYB2A .
-- James Merrill tothepixel.com http://www.toThePixel.com
I narrowed this down to the connected-react-router library. Sorry for the confusion.
Version
React Router DOM v 5.0.1
Steps to reproduce
Create a router
<switch>
statement with multiple<routes>
. Click a few<link>
s, then use the browser back button. Not sure if it's relevant, this is a larger React Application with Redux, and loadables.Expected Behavior
When the back button is pressed, previously mounted but no longer relevant routes should unmount their children without changing their props.
Actual Behavior
The components mounted under the previously relevant
<route>
will get at least one prop update. This update contains apathname
andsearch
that do not pass thepath="/blah"
validation. They also will not match the current window.location.