Skip to content

Expo Cursor Rules: Update navigation guideline to use Expo Router#141

Merged
PatrickJS merged 1 commit intoPatrickJS:mainfrom
adriaanbalt:patch-1
Sep 9, 2025
Merged

Expo Cursor Rules: Update navigation guideline to use Expo Router#141
PatrickJS merged 1 commit intoPatrickJS:mainfrom
adriaanbalt:patch-1

Conversation

@adriaanbalt
Copy link
Copy Markdown
Contributor

@adriaanbalt adriaanbalt commented Sep 6, 2025

Expo Router is preferred over React Navigation as of SDK 52.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Sep 6, 2025

Walkthrough

Updated guidance in a prompt rules file to recommend Expo Router instead of React Navigation within the React Native Expo best practices list.

Changes

Cohort / File(s) Summary of Changes
Prompt rules update
rules/react-native-expo-cursorrules-prompt-file/.cursorrules
Replaced navigation guidance from "React Navigation" to "Expo Router" in reactNativeExpoBestPractices; no other items changed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

I twitch my nose at routes anew,
From stacks to files, a tidy view—
Hop hop! The Expo paths align,
A carrot-colored route design.
With gentle paws I mark the way,
Expo Router leads the day. 🥕🐇

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between b962e13 and c08e43f.

📒 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.

@PatrickJS PatrickJS merged commit c78546c into PatrickJS:main Sep 9, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants