79293531

Date: 2024-12-19 08:25:00
Score: 0.5
Natty:
Report link

Expo Router works with file-based routing, much like traditional websites. The index file is the default entry into your app / a specific directory.

If you for whatever reason would like to use "page1" as your default entry file instead, there are two ways to accomplish this:

  1. The less hacky way. You could make an index file that returns a Redirect to "/page1"
  2. You could use the unstable settings to redefine the Expo Router behaviour to your expectation. You can set initialRouteName to "page1" on your stack and this should cause it to act like the index.
Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Wilhelm Erasmus