It'd be nice if expo-router would support some pattern like
[paramName?]
to make params optional.
Example:
With this filesystem:
- [param?]/
- index.tsx
- other.tsx
it should create the following paths:
  • /
  • /other
  • /[param]
  • /[param]/other
Motivation:
As far as I got it, expo-router will pass "query params" only to the rendered screen (without layouts). I have a case where my structure is:
- RootStack/
- Tabs/
- TabStack1/
- TabStack2/
- TabStack3/
I need a global param that is optional, at the moment I moved to.
- RootStack/
- [param]/
- Tabs/
- TabStack1/
- TabStack2/
- TabStack3/
and I pass
"none"
when I do not need that param.