A curated collection of independent React Native projects, architectural patterns, and performance-optimized modules. This repository serves as a production-ready reference for advanced React Native development.
- Surgical Changes: Most projects are independent. Do NOT introduce global dependencies unless specifically requested.
- Native Integration: Be prepared to modify
android/andios/folders. This repository emphasizes native-to-JS communication (TurboModules, Codegen). - Validation: Always verify changes by checking both the JS side (TypeScript) and the Native side (Kotlin/Swift).
- 16KB Page Size Support:
- For Android native modules, ALWAYS include support for 16KB page alignment to ensure compatibility with Android 15+ devices.
- Performance First: Use
reanimated,gesture-handler, andFlashListfor high-performance UI. Do not use the standard React Native Animated API or gesture systems. - Modular Structure: Maintain a modular file and folder structure. Avoid placing all logic in a single file; follow industry-standard project organization (e.g., separating components, hooks, services, and styles).
- Comprehensive Documentation:
- Code Comments: ALWAYS include descriptive comments in your code to explain complex logic, architectural decisions, and library-specific implementations for better maintainability and understanding.
- Project READMEs: ALWAYS update or create project-level
README.mdfiles with comprehensive details about the project's purpose, libraries used (with versions), architecture, and usage examples. Documentation must be kept in sync with code changes.
- Contextual Research:
- Always reference the root
README.mdfor conceptual grounding (TTI, Threading, Hermes) before suggesting architectural changes. - Read module-specific
README.mdfiles before modifying any sub-project.
- Always reference the root
- Library Documentation: Mandatory Doc Review. ALWAYS use
context7or web search before using any library to deeply understand its usage, implementation details, and dependencies. Never rely on training data for library APIs or architectural patterns. - Research: Mandatory Research First. Always perform a web search to find the latest information, library updates (e.g., React 19, RN 0.76+), and best practices before implementing new features or fixing complex bugs.
- Latest Tech Mandate: Always prioritize and use the latest features from React (e.g., Actions,
usehook, React Compiler) and React Native (e.g., Bridgeless Mode, New Architecture enabled by default) by verifying current documentation via search. - Package Versions: ALWAYS perform a web search to find the latest stable versions of libraries before adding or updating them in
package.json. Never guess package versions or rely on outdated training data. - Anti-Hallucination: Never guess. If documentation is unclear or a solution is ambiguous, ask the user for clarification. Do not hallucinate API signatures or library capabilities.
- Verification: Empirically reproduce issues before applying fixes and verify implementations against current official documentation.
- Framework: React Native (Latest stable version, prioritized New Architecture/Bridgeless)
- Architecture: New Architecture (Fabric, TurboModules, JSI) prioritized.
- Pattern: Compound Component Pattern or other advanced architectural patterns for complex UI.
- State Management: Zustand, Jotai, or Redux Toolkit.
- Styling: Vanilla CSS, NativeWind (in
NativeWindDLS). - Animation & Gestures: Mandatory use of
react-native-reanimatedandreact-native-gesture-handler.
To create and build a new Expo project with a custom dev client (SDK 55+), follow these steps:
npx create-expo-app@latest MyApp --template default@sdk-55
cd MyAppnpx expo install expo-dev-clientnpx expo prebuild --clean# Android
npx expo run:android
ELECTRON_DISABLE_SANDBOX=1 npx expo run:android; ## For ubuntu
# iOS
npx expo run:iosThis compiles your own binary and installs it on the device or emulator. After this you never need Expo Go.
npx expo startYour custom dev client is already installed. This just starts the Metro bundler and serves JS. Fast refresh works exactly like before.
Always use npx expo install instead of npm install / yarn add for packages with Expo-managed native dependencies:
npx expo install expo-camera
npx expo install expo-location react-native-mapsnpx expo install resolves the exact version compatible with your current SDK — e.g. for SDK 55 it pins expo-camera@55.x.x. Using npm install without a version can pull in a build targeting a different SDK and cause subtle, hard-to-debug breakage.
Use npm install / yarn add only for pure-JS packages that have no Expo SDK coupling (e.g. lodash, zod, date-fns).
The following core Ubuntu packages are pre-installed in this environment. Use these CLI tools whenever possible for faster and more efficient operations:
- Poppler-utils: (
pdftotext, etc.) For PDF text extraction. - Pandoc: For advanced document format conversion.
- ImageMagick: For image manipulation and preprocessing.
- Tesseract OCR: (
tesseract-ocr,tesseract-ocr-eng) For reading text from images and scanned PDFs. - LibreOffice: For converting Word/Excel files to PDF or CSV via CLI.
- jq: For high-performance JSON parsing and manipulation.
- yq: (mikefarah/yq) The industry-standard YAML/XML/CSV/Properties processor.
- TypeScript only — no plain
.jsfiles in source. - Use
interfacefor object shapes,typefor unions/aliases. - Strict Typing Mandate:
- NO
anytypes. The use ofanyis strictly forbidden. - Use proper generics or
unknownfor dynamic values. - If a library has strict constraint issues (like Nitro), resolve them using architectural patterns (e.g., proper inheritance) rather than type casting to
any.
- NO
- Prefer explicit return types on all exported functions and components.
- Functional components only — no class components.
- Pattern: Prefer Compound Component Pattern for highly interactive or customizable UI elements.
- Modular Pattern Mandate:
- Hooks for Logic: All business logic, state management, and side effects MUST be placed in custom hooks (e.g.,
useMyFeature.ts). - Small Components: Large screens MUST be broken down into small, focused sub-components (placed in a
components/directory). - Prop Typing: Use
React.FC<Props>or explicit prop typing. - No Monolithic Files: Keep components in their own files; no multi-component files.
- Prefer named exports over default exports.
- Hooks for Logic: All business logic, state management, and side effects MUST be placed in custom hooks (e.g.,
- Separate Files: Always write styles in separate files (e.g.,
ComponentName.styles.ts). Never include styles in the same file as the component logic. - Use
StyleSheet.create()by default. No inline style objects in JSX. NativeWindDLSproject uses Tailwind class strings — noStyleSheetthere.
- SafeAreaView Mandate: ALWAYS use
SafeAreaViewfromreact-native-safe-area-context. - FORBIDDEN: NEVER use the built-in
SafeAreaViewfromreact-nativeas it is deprecated and inconsistent across platforms. - Wrap the root of the app in
SafeAreaProvider.
- FlashList Mandate: Always use
@shopify/flash-list. Do not use FlatList. - Set
keyExtractorexplicitly. - For FlashList v2, do not use
estimatedItemSizeas sizing is handled automatically. - Avoid inline
renderItemarrow functions — define outside component.
- Mandatory: Always use
react-native-reanimated(v2/v3) andreact-native-gesture-handler. - Forbidden: Do not use the built-in React Native
AnimatedAPI or standard gesture responder systems. - For layout animations or complex interactions → use
react-native-reanimatedwith worklets. - Postpone heavy work during animations using
InteractionManager.runAfterInteractions().
- Never use AsyncStorage for sensitive data — use
turbo-secure-storageor MMKV. - Use
react-native-mmkvfor high-performance, synchronous key-value storage.
- Jest & Detox: Favor Jest for unit testing and Detox for E2E testing.
- Error Handling: Implement robust retry logic and offline support for networking modules.
- Code Quality:
- No
console.login committed code. - No commented-out code blocks.
- No unused imports or variables.
- Implement robust loading and error states.
- No
| Folder | Concept / Purpose |
|---|---|
AbsoluteImports |
Path aliasing with @app/* |
analytics |
Turbo Module (New Architecture) |
InfiniteScrollFlashList |
Generic Infinite Scroll Pagination |
mmkv |
JSI Key-Value Storage |
mvvm_example |
MVVM Architecture (Reference Only) |
ReduxSaga |
Redux + Saga Management |
TurboDemo |
TurboModules & Codegen Demo |
NativeWindDLS |
Tailwind CSS via NativeWind |
widgetApp |
Home screen widget implementation |
Note: This repository is a living reference. When adding new examples, ensure they are well-documented and follow these high standards.