Layout in nested Slot causes <Link /> to not route in v2.
austin43 opened this issue · comments
Which package manager are you using? (Yarn is recommended)
yarn
Summary
When converting a normal modal.tsx file to a modal folder with a _layout and index file, <Link href="/modal" />
no longer works.
Minimal reproducible example
Possibly related to #768. When I pull initialRouteName out, the routing works again as expected.
I'm seeing this too and I have a similar route structure to you where I have a parent route, a layout with a Slot, and then child routes. If I'm on the child route, using router.push or Link to the parent route will not navigate for me. My app does not use initialRouteName
so your attempted fixed doesn't work for me.
![image](https://private-user-images.githubusercontent.com/23384650/267793427-20b500f1-f7f1-41a8-afbb-0d20b92b63db.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTUyNzMwNTksIm5iZiI6MTcxNTI3Mjc1OSwicGF0aCI6Ii8yMzM4NDY1MC8yNjc3OTM0MjctMjBiNTAwZjEtZjdmMS00MWE4LWFmYmItMGQyMGI5MmI2M2RiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA1MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwNTA5VDE2MzkxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQzY2Q5Y2RjNDRlNjA1ZDZmM2E4MWZkZmIzNjUyYjQ3YTE2N2M0N2IyNmQ4Nzc0OWRiY2ZmMWE3ZGZmMGMyYmImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.q6geTCJ7jVlULs7S39PApkjfnKGqdceptdjY-nTG_zc)
The scenario I'm talking about attempts to go from /benefit/support/faqs
to /benefit/support
. This used to work with the previous expo-router version.