If a drawer-screen with stack navigator is nested inside a drawer navigator and then deeplinked to a screen within the stack navigator with a parameter, the parameter is still present when we navigate to the screen without passing the parameter.
When we navigate to the screen without passing any parameter, the parameter has to be undefined.
npm i --legacy-peer-deps
npx pod-install ios
npx react-native run-ios
xcrun simctl openurl booted "mychat://detail?id=123"
we should see { id: 123 }
being shown on the screen
We should see { id: 789 }
being shown on the screen
We still see { id: 123 }
being shown on the screen. The expected behaviour here is that the id is undefined.
- Now do a full reload. And tap the button
Go to Details with id '789'
. We should see{ id: 789 }
being shown. Then if we tap the buttonGo to Details without id
, we see that the id is undefined as expected. This is the same behaviour I expect after deeplinking too but instead{ id: 123 }
param is being remembered.
Note: I tried it on v6 and was able to reproduce as well