Skip to main content
skill CX Codex

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.

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add Mindrally/skills --skill expo-react-native-javascript-best-practices -a claude-code
Open on GitHub

What 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-code

2Manually: put the files in place

~/.claude/skills/expo-react-native-javascript-best-practices/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/expo-react-native-javascript-best-practices/

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

Similar skills

Everything for Mobile →

From the same set214

vue-typescript Strict standards for Vue 3 and TypeScript development with Vite, Pinia, and Tailwind CSS. Enforces Composition API and frontend performance rules. CX Codex +1 782installs android-development A rule set that keeps your coding agent on track with Kotlin and Android: clean architecture, MVI, Material 3. Useful when generated code drifts in style and layering. CX Codex +1 782installs kysely A skill that gives the agent rules for writing Kysely code: schema typing, joins, transactions, type generation. Useful when your project is TypeScript and SQL. CX Codex +1 780installs github-workflow A rule set that tells your agent how to work with GitHub: pull requests, review comments, Actions workflows, issue templates and branch protection. Useful whenever the agent touches a repo. CX Codex +1 780installs rust Tells the agent how to write Rust: ownership for memory safety, async on tokio, errors via Result and Option. CX Codex +1 778installs cpp Guidelines for modern C++17 and C++20 coding. Enforces RAII, smart pointers, memory safety, and modern standard library patterns in AI-generated code. CX Codex +1 775installs aspnet-core Gives your agent a set of ASP.NET Core conventions: controllers, middleware, caching, JWT and validation. Useful when an API is being written or rewritten. CX Codex +1 776installs observability-guidelines Guides coding agents on implementing OpenTelemetry tracing, metrics collection, and JSON logging across distributed microservices. CX Codex +1 773installs

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor