A step-by-step guide to setting up a React Native monorepo using pnpm workspaces, covering both mobile and Next.js web apps. Covers project structure with apps/ and packages/ directories, pnpm workspace configuration with hoisted node-linker for React Native compatibility, Metro bundler adjustments, iOS CocoaPods and Android

11m read timeFrom callstack.com
Post cover image
Table of contents
Understanding monoreposWhy monorepos matter in a React Native setupWorkspace approachSetting up pnpm workspacesHow to build the React Native app inside the workspaceAdapting React Native for a monorepo layoutSharing TypeScript settings across the monorepoCreating shared packagesAdding a web applicationVerifying shared UI on both platformsWrap-up

Sort: