expo / router

[ARCHIVE]: Expo Router has moved to expo/expo -- The File-based router for universal React Native apps
https://docs.expo.dev/routing/introduction/
1.37k stars 114 forks source link

[SDK 49, V2] - Redirects broken, if redirecting to another page in the same group #776

Closed OneHatRepo closed 1 year ago

OneHatRepo commented 1 year ago

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

npm

Summary

Redirects don't work if redirecting to another page in the same group.

Install the repro example. It will start at '/' and successfully redirect to '/page1', which is in the '(group)' group.

You will then see three links.

  1. The first tries to navigate to '/page3', via a redirect from '/page2'. This fails. The error claims it cannot find page3. These two pages are in the same group.
  2. The second tries to go to '/page3' directly, and this works, showing that the page actually exists and can be found when not using a redirect.
  3. The third tries to go to '/page5' via a redirect from '/page4' and this works. The pages are not in the same group.

This is a significant bug, and makes it really difficult to implement my app.

Minimal reproducible example

git@github.com:OneHatRepo/ExpoRouterRedirects.git

marklawlor commented 1 year ago

Closing in favour of https://github.com/expo/router/issues/793