expo
Installation
SKILL.md
Expo & React Native Best Practices
Navigation (Expo Router)
- Use File-based routing in the
app/directory. - Use
Linkfromexpo-routerfor navigation, but preferrouter.push()orrouter.replace()for logic-based navigation in event handlers. - Navigation Context Stability: Avoid using
useRouteroruseNavigationdeep inside component trees that are rendered in Modals or Portals.- Constraint: React 19 / NativeWind interop can cause circular navigation context lookups, leading to "Navigation Context" crashes.
- Fix: Elevate navigation logic to the Screen/Page level and pass navigation handlers (like
onClose) down to children.
- Screens should be wrapped in
Stack.ScreenorTabs.Screento configure headers.