Instrucciones de origen · Vista previa de solo lectura
name
expo-framework-rule
description
Expo Framework-specific guidelines. Includes best practices for Views, Blueprints, and Extensions.
version
1.1.0
model
sonnet
invoked_by
both
user_invocable
true
tools
["Read","Write","Edit"]
globs
**/expo/**/*.*
best_practices
["Follow the guidelines consistently","Apply rules during code review","Use as reference when writing new code"]
error_handling
graceful
streaming
supported
verified
true
lastVerifiedAt
"2026-02-22T00:00:00.000Z"
source
builtin
trust_score
100
provenance_sha
cb59edbabce60181
Expo Framework Rule Skill
You are a coding standards expert specializing in expo framework rule.
You help developers write better code by applying established guidelines and best practices.
- Review code for guideline compliance
- Suggest improvements based on best practices
- Explain why certain patterns are preferred
- Help refactor code to meet standards
When reviewing or writing code, apply these comprehensive Expo framework guidelines.
Example usage:
```
User: "Review this code for expo framework rule compliance"
Agent: [Analyzes code against guidelines and provides specific feedback]
```
# Development build
eas build --profile development --platform ios
# Preview build (internal testing)
eas build --profile preview --platform android
# Production build
eas build --profile production --platform all
# Build and auto-submit
eas build --profile production --auto-submit
# Publish to production channel
eas update --channel production --message "Fix login bug"# Publish to preview
eas update --channel preview --message "Test new feature"# View update history
eas update:list --channel production
Update Channels Strategy
// Different channels for different environments
production -> main branch
staging -> develop branch
preview -> feature branches
Checking for Updates in App
import * asUpdatesfrom'expo-updates';
asyncfunctioncheckForUpdates() {
if (!__DEV__) {
const update = awaitUpdates.checkForUpdateAsync();
if (update.isAvailable) {
awaitUpdates.fetchUpdateAsync();
awaitUpdates.reloadAsync();
}
}
}
// Check on app focususeEffect(() => {
const subscription = AppState.addEventListener('change', state => {
if (state === 'active') {
checkForUpdates();
}
});
return() => subscription.remove();
}, []);
Runtime Version Management
{"expo":{"runtimeVersion":"1.0.0"}}
Only compatible OTA updates will be delivered to builds with matching runtime versions.
{"expo":{"name":"My App","slug":"my-app","version":"1.0.0","orientation":"portrait","icon":"./assets/icon.png","userInterfaceStyle":"automatic","splash":{"image":"./assets/splash.png","resizeMode":"contain","backgroundColor":"#ffffff"},"assetBundlePatterns":["**/*"],"ios":{"supportsTablet":true,"bundleIdentifier":"com.company.myapp","buildNumber":"1.0.0","infoPlist":{"NSCameraUsageDescription":"We need camera access for photos","NSLocationWhenInUseUsageDescription":"Location for nearby features"}},"android":{"package":"com.company.myapp","versionCode":1,"adaptiveIcon":{"foregroundImage":"./assets/adaptive-icon.png","backgroundColor":"#ffffff"},"permissions":["CAMERA","ACCESS_FINE_LOCATION"]},"web":{"favicon":"./assets/favicon.png","bundler":"metro"},"plugins":["expo-router",["expo-camera",{"cameraPermission":"Allow $(PRODUCT_NAME) to access camera"}]],"extra":{"apiUrl":"https://api.example.com"}}}
This checks for common issues with dependencies and configuration.
Iron Laws
ALWAYS use Expo Router for navigation — never use React Navigation directly in new Expo projects; Expo Router provides file-based routing that integrates with native navigation and deep linking.
NEVER eject to bare workflow unless the required native module is genuinely unavailable through Expo SDK, config plugins, or EAS Build — ejecting increases maintenance burden by orders of magnitude.
ALWAYS use EAS Build for production builds — never use local expo build (deprecated) or react-native run-ios/android for release builds; EAS ensures consistent reproducible builds.
NEVER use expo-av for camera in new projects — use expo-camera directly; expo-av is audio/video focused and the camera integration is deprecated.
ALWAYS use expo-image instead of React Native's built-in <Image> — expo-image provides lazy loading, caching, and blurhash placeholder support out of the box.
Anti-Patterns
Anti-Pattern
Why It Fails
Correct Approach
Using React Navigation instead of Expo Router
Misses file-based routing, native tab/stack integration, and automatic deep linking
Use Expo Router; it wraps React Navigation with file-system conventions
Ejecting early "just in case"
Loses OTA updates, managed builds, and Expo SDK updates forever
Exhaust all Expo SDK/config plugin options first; eject only as last resort
Using deprecated expo build command
Removed in SDK 46+; fails silently or produces broken artifacts
Use eas build with a properly configured eas.json
Direct require() for images in performance-critical code
Large bundles; no lazy loading; no progressive blur placeholder
Use expo-image with contentFit and blurhash for optimized loading
Using expo-constants for secrets
Constants are bundled into the app binary and visible in source maps
Use EAS secrets or server-side environment variables; never bundle secrets
Memory Protocol (MANDATORY)
Before starting:
cat .claude/context/memory/learnings.md
After completing: Record any new patterns or exceptions discovered.
ASSUME INTERRUPTION: Your context may reset. If it's not in memory, it didn't happen.