Expo in practice · mid
Expo in a monorepo
Expo supports monorepos (npm, Yarn, pnpm and Bun workspaces) with automatic Metro configuration since SDK 52, so the main rules are: one copy of react and react-native in the whole repo, shared code as workspace packages, and let autolinking find native modules.
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceThe notes
What you must know
- Since SDK 52, Metro is configured for monorepos automatically; remove old manual watchFolders / nodeModulesPaths settings.
- Isolated installs (pnpm, Bun) work from SDK 54; autolinkingModuleResolution is on automatically in monorepos from SDK 55.
- Duplicate react or react-native versions break the app ("Invalid hook call", native module mismatches). Force one version with resolutions (Yarn/pnpm) or overrides (npm).
- Share code as workspace packages (packages/ui, packages/api, packages/config). Share logic first; share UI with the web only where it fits (react-native-web).
- Keep native dependencies in the app package that is built, so autolinking and prebuild see them.
The red pen
Common traps: mistake → fix
Mistake: "Two React versions are fine in different packages"
Fix: the app breaks with invalid hook calls.
Mistake: "Copy the Metro monorepo config from an old blog post"
Fix: not needed since SDK 52 and can break resolution.
Easy to hard
Questions interviewers ask, easy to hard
- How would you set up a monorepo with an Expo app and a Next.js web app sharing code?
- What breaks when two copies of React are installed?
- How do native modules from a shared package get linked?
Explain it out loud
Explain it out loud to an AI interviewer that follows up, and see where your answer is thin.
Practise by voiceYour first interview is free
Sign up and start with a 15-minute interview with the full report, and an English conversation. No card needed.