expo-react-native-javascript-best-practices — Claude Code skill
Guidelines for building Expo React Native apps using JavaScript. Guides your AI agent on functional components, Expo Router navigation, and FlatList tuning.
npx skills add Mindrally/skills --skill expo-react-native-javascript-best-practices -a claude-codeWhat expo-react-native-javascript-best-practices does
This skill guides coding assistants to follow clean JavaScript practices in Expo React Native projects. It enforces functional components using hooks like useState and useEffect, camelCase for variables, and feature-based directory organization. When TypeScript is not in use, it instructs the agent to check props with PropTypes.
Performance rules focus on the UI thread. The agent learns to prevent re-renders with React.memo() and tune FlatList using removeClippedSubviews, maxToRenderPerBatch, and windowSize. It also bans anonymous callback functions inside renderItem handlers. Styling relies on StyleSheet.create() or Styled Components, with react-native-fast-image recommended for images.
Navigation relies entirely on Expo Router for cross-platform deep linking across Android, iOS, and web. Deployment practices reference EAS Build and OTA updates. For teams already running strict TypeScript, the PropTypes conventions will be redundant.
What it helps with
- tune FlatList performance with batching and clipping props
- configure file-based navigation using Expo Router
- split large React Native components into functional hooks
- enforce feature-based directory structures in Expo apps
Example prompts for the agent
- Build a user profile screen using Expo Router and functional components
- Optimize my FlatList component configuration according to the skill guidelines
- Refactor this class component into a hook-based functional component with PropTypes
How to install expo-react-native-javascript-best-practices
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill expo-react-native-javascript-best-practices -a claude-code2Manually: put the files in place
~/.claude/skills/expo-react-native-javascript-best-practices/SKILL.mdCopy the whole skill folder; for one project use .claude/skills/expo-react-native-javascript-best-practices/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill expo-react-native-javascript-best-practices -a codex2Manually: put the files in place
.agents/skills/expo-react-native-javascript-best-practices/SKILL.mdFor all projects use ~/.agents/skills/
1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill expo-react-native-javascript-best-practices -a cursor2Manually: put the files in place
.cursor/skills/expo-react-native-javascript-best-practices/SKILL.mdCursor also reads .agents/skills/ and .claude/skills/
1GitHub CLI
gh skill install Mindrally/skills expo-react-native-javascript-best-practices2Manually: put the files in place
.github/skills/expo-react-native-javascript-best-practices/SKILL.md1Skills CLI (Vercel)
npx skills add Mindrally/skills --skill expo-react-native-javascript-best-practices -a gemini-cli2Platform CLI
gemini skills install https://github.com/Mindrally/skills --path expo-react-native-javascript-best-practicesManually: put the files in place
.devin/skills/expo-react-native-javascript-best-practices/SKILL.mdThe legacy .windsurf/skills/ path still works
Skills CLI (Vercel)
npx skills add Mindrally/skills --skill expo-react-native-javascript-best-practices -a opencodeClaude.ai
Zip the folder and upload it in Settings → Capabilities → Skills
Step by step, with commands for each platform: How to install skills in Claude Code: five ways
Questions about expo-react-native-javascript-best-practices
How do I install expo-react-native-javascript-best-practices in Claude Code?
Run npx skills add Mindrally/skills --skill expo-react-native-javascript-best-practices -a claude-code in your terminal.
What does this skill configure?
It adds instructions for code modularity, naming rules, Expo Router file-based routing, and list rendering optimizations.
Can I use this skill with TypeScript?
The skill targets plain JavaScript codebases and specifies PropTypes for validation. In a TypeScript project, those prop-checking rules are unnecessary.
Source text
SKILL.md · Apache-2.0
--- name: expo-react-native-javascript-best-practices description: Expo React Native JavaScript best practices for clean code, functional components, performance optimization, and Expo Router navigation. metadata: maintainer: Mindrally source: https://github.com/Mindrally/skills --- # Expo React Native JavaScript Best Practices Guidelines for building high-quality Expo React Native applications with JavaScript, focusing on clean code, modularity, and performance. ## Code Style and Structure - **Clean, Readable Code**: Ensure your code is easy to read and understand. Use descriptive names for variables and functions. - **Functional Components**: Prefer functional components with hooks (useState, useEffect) over class components - **Component Modularity**: Break components into smaller, reusable pieces with single responsibility - **Feature-Based Organization**: Group related components, hooks, and styles into feature directories (e.g., user-profile, chat-screen) ## Naming Conventions - **Variables and Functions**: Use camelCase (e.g., `isFetchingData`, `handleUserInput`) - **Components**: Use PascalCase (e.g., `UserProfile`, `ChatScreen`) - **Directories**: Use lowercase hyphenated names (e.g., `user-profile`, `chat-screen`) ## JavaScript Usage - Minimize global variables to prevent unintended side effects - Leverage ES6+ features like arrow functions, destructuring, and template literals to write concise code - Use PropTypes for type checking if not using TypeScript ## Performance Optimization - Avoid unnecessary state updates; use local state when needed - Apply `React.memo()` to prevent unnecessary re-renders - Optimize FlatList with the following props: - `removeClippedSubviews` - `maxToRenderPerBatch` - `windowSize` - Avoid anonymous functions in `renderItem` or event handlers ## UI and Styling - Use `StyleSheet.create()` for consistent styling or Styled Components for dynamic styles - Ensure responsive design across screen sizes and orientations - Use optimized image libraries like `react-native-fast-image` ## Best Practices - Follow React Native's threading model for smooth UI performance - Use Expo's EAS Build and OTA updates for deployment - **Expo Router**: Use Expo Router for file-based routing in your React Native app. It provides native navigation, deep linking, and works across Android, iOS, and web
© Mindrally · Apache-2.0 · Mindrally/skills