Skip to content

Commit 282d137

Browse files
committed
Migrate to Expo Router file-based navigation
- Replace @react-navigation/native-stack with expo-router - File-based routing under app/ with Stack.Toolbar for native menus - routeItemCache uses compound key (storyID-commentID) to fix stale data - Move injectedJavaScript to Zustand store to avoid URL encoding issues - ThreadScreen uses local-only tab state (no URL sync) - Add SF Symbol icons to all Stack.Toolbar.MenuAction items - Fix UserScreen header padding/overlap/alignment - Replace prettier with oxfmt for formatting
1 parent 060b03b commit 282d137

30 files changed

Lines changed: 2203 additions & 1770 deletions

.prettierrc renamed to .oxfmtrc.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,8 @@
1717
],
1818
"importOrderSeparation": true,
1919
"importOrderSortSpecifiers": true,
20-
"importOrderGroupNamespaceSpecifiers": true
20+
"importOrderGroupNamespaceSpecifiers": true,
21+
"printWidth": 80,
22+
"sortPackageJson": false,
23+
"ignorePatterns": []
2124
}

AGENTS.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ A read-only Hacker News client for iOS, built with React Native and Expo.
99
- **Expo SDK 56** (managed workflow)
1010
- **React Native 0.85.3**
1111
- **React 19.2.3**
12-
- **Navigation**: React Navigation (`@react-navigation/native-stack`) — NOT Expo Router
12+
- **Navigation**: Expo Router (file-based routing)
1313
- **Node.js**: >= 20.x
1414
- **iOS only** (platforms: `["ios"]`)
1515
- **Min iOS version**: 26.0
@@ -19,7 +19,7 @@ A read-only Hacker News client for iOS, built with React Native and Expo.
1919

2020
| Package | Purpose |
2121
|---------|---------|
22-
| `@react-navigation/native-stack` | Native stack navigation |
22+
| `expo-router` | File-based routing |
2323
| `react-native-gesture-handler` | Gesture handling |
2424
| `react-native-reanimated` | Animations |
2525
| `react-native-safe-area-context` | Safe area insets |
@@ -53,7 +53,8 @@ GitHub Actions deploy on push to `main`:
5353
## Project Structure
5454

5555
```
56-
App.js — App entry, navigation setup
56+
App.js — App entry, passes to Expo Router
57+
app/ — File-based routes (Expo Router)
5758
screens/ — Screen components
5859
components/ — Reusable UI components
5960
hooks/ — Custom hooks (useStore, useTheme, etc.)
@@ -65,5 +66,12 @@ assets/ — Icons, splash images
6566

6667
- Use `SymbolView` from `expo-symbols` for icons (SF Symbols)
6768
- Theming via `useTheme` hook (dark mode aware)
68-
- Navigation uses React Navigation native stack — NOT Expo Router
69-
- All OTA update logic is in `App.js`
69+
- Navigation uses Expo Router native stack
70+
- **Formatting**: `oxfmt` (0.52.0), config in `.oxfmtrc.json`. Run `npx oxfmt --write <files>` or `npx oxfmt --write .` to format.
71+
72+
## Navigation
73+
74+
- **Expo Router** with file-based routing
75+
- Stack.Screen presentation: `modal` for overlays, `formSheet` for user screen
76+
- Use `useLocalSearchParams` for route params, `useRouter` for navigation
77+
- OTA update logic is in `app/_layout.jsx`

0 commit comments

Comments
 (0)