Expo Cursor Rules: Update navigation guideline to use Expo Router#141
Expo Cursor Rules: Update navigation guideline to use Expo Router#141PatrickJS merged 1 commit intoPatrickJS:mainfrom
Conversation
WalkthroughUpdated guidance in a prompt rules file to recommend Expo Router instead of React Navigation within the React Native Expo best practices list. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
✨ Finishing Touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
rules/react-native-expo-cursorrules-prompt-file/.cursorrules (2)
16-26: Align folder structure with Expo Router’s app/ convention.The example still shows screens/ and navigation/ (React Navigation style) and App.js. For Expo Router, prefer app/ with file-based routes and layouts; App.js is typically unnecessary.
Apply this diff:
-const folderStructure = ` -assets/ -src/ - components/ - screens/ - navigation/ - hooks/ - utils/ -App.js -app.json -`; +const folderStructure = ` +assets/ +app/ + _layout.tsx + index.tsx +src/ + components/ + hooks/ + utils/ +app.json +`;
30-38: Add a Router-specific instruction for clarity.Consider adding guidance about file-based routing and deep links so the rule is actionable.
const additionalInstructions = ` 1. Use TypeScript for type safety 2. Implement proper styling using StyleSheet 3. Utilize Expo's vector icons 4. Use Expo's secure store for sensitive data 5. Implement proper offline support 6. Follow React Native best practices for performance 7. Use Expo's OTA updates for quick deployments +8. Use Expo Router’s file-based routing (app/, _layout.tsx) and configure deep links with expo-linking `;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
rules/react-native-expo-cursorrules-prompt-file/.cursorrules(1 hunks)
🔇 Additional comments (1)
rules/react-native-expo-cursorrules-prompt-file/.cursorrules (1)
8-8: Expo Router recommendation looks good.Clear and aligned with common Expo usage. No issues with the wording as-is.
Expo Router is preferred over React Navigation as of SDK 52.