Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
Build performant React Native and Expo apps with best practices for lists, animations, and navigation
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
rules/monorepo-native-deps-in-app.md
1---2title: Install Native Dependencies in App Directory3impact: CRITICAL4impactDescription: required for autolinking to work5tags: monorepo, native, autolinking, installation6---78## Install Native Dependencies in App Directory910In a monorepo, packages with native code must be installed in the native app's11directory directly. Autolinking only scans the app's `node_modules`—it won't12find native dependencies installed in other packages.1314**Incorrect (native dep in shared package only):**1516```17packages/18ui/19package.json # has react-native-reanimated20app/21package.json # missing react-native-reanimated22```2324Autolinking fails—native code not linked.2526**Correct (native dep in app directory):**2728```29packages/30ui/31package.json # has react-native-reanimated32app/33package.json # also has react-native-reanimated34```3536```json37// packages/app/package.json38{39"dependencies": {40"react-native-reanimated": "3.16.1"41}42}43```4445Even if the shared package uses the native dependency, the app must also list it46for autolinking to detect and link the native code.47