Android, iOS and Web App Monorepo with React Native. Yarn monorepo
Prerequsites
Set up yarn monorepo root
Let’s start with creating the project monorepo. I am going to use github and yarn. Starting from now I will be using this repo for the project: android-ios-web-monorepo-react-native.
Create the project root folder and switch to it
The next command will create a package.json file. Answering to prompts choose all the default values, except for private, which we should have set to true. Because yarn workspaces are not meant to be published by design.
After we finished our package.json will look like this*
Project code on github.
That was a good start!
(*) If you initialized git in a new project folder, then you may discover more properties in package.json (ex: author or repository). I excluded them on purpose to keep the sample lean.