Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to navigate to modal stack initial route, within (group) directory #831

Open
leggomuhgreggo opened this issue Aug 8, 2023 · 3 comments

Comments

@leggomuhgreggo
Copy link

leggomuhgreggo commented Aug 8, 2023

Which package manager are you using? (Yarn is recommended)

Yarn

Summary

This folder structure, using the group syntax doesn't seem to support linking to the index initial route of the modal stack

app
| -- (modal-stack) <-- links here don't work
|    |-- _layout.tsx
|    |-- modal-screen-1.tsx
|    |-- modal-screen-2.tsx
| -- _layout.tsx
| -- index.tsx
Screen Recording
Simulator.Screen.Recording.-.iPhone.14.-.2023-08-05.at.15.01.25.mp4

Group Folder

  • <Link href="/(modal-stack)/">(modal-stack)</Link>
  • <Link href="/(modal-stack)/modal-screen-1">modal-screen-1</Link>

Normal Path Folder

  • <Link href="/modal-stack/">modal-stack</Link>
  • <Link href="/modal-stack/modal-screen-1">modal-screen-1</Link>

Minimal reproducible example

https://github.com/leggomuhgreggo/nav-testing/tree/expo-router-repro/modal-stack-grouped

@leggomuhgreggo leggomuhgreggo changed the title Unable to navigate to modal stack index route, within (group) directory Unable to navigate to modal stack initial route, within (group) directory Aug 8, 2023
@leggomuhgreggo
Copy link
Author

@leggomuhgreggo
Copy link
Author

leggomuhgreggo commented Dec 18, 2023

I think the issue is that the router can't distinguish between the root index and the (group) index.

I theory, it seems like this should be possible w/ unstable_settings.initialRouteName but this is not currently supported

Can also define (group)/index.tsx but this isn't always ideal.

@marklawlor
Copy link
Contributor

@leggomuhgreggo Can you please create a new issue on the main repo https://github.com/expo/expo, as development has moved there.

When you do so, can you please update your reproduction repo to be a minimal example. Providing a repo with 6 different apps is not a good minimal reproduction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants