Template project for sharing code between iOS, Android & Web using monorepo
React Native template project for creating iOS, Android and Web apps
With this monorepo project, you can develop mobile & web projects with React Native and React Native Web. You can check this Turkish blog about how this project developed.
You can check out this Turkish Github blog post
yarn install
cd packages/mobile
npm install -g wml
wml add ../common ./node_modules/@monorepo/common
open . -a iterm && wml start
open . -a iterm && cd ../common && yarn watch
open . -a iterm && cd ../mobile/ios && pod install && cd ../ && npx react-native run-ios -- --reset-cache
open . -a iterm && cd ../web && yarn start
cd ../../ && code .
Notes:
yarn install && cd packages/common && npm install grunt --save-dev && npm install grunt-contrib-watch --save-dev && npm install grunt-sync --save && grunt --watch
# Duplicate tab
cd ../common && yarn watch
# Duplicate tab
cd ../mobile && npx react-native run-android -- --reset-cache
# Duplicate tab
cd ../web && yarn start
# Duplicate tab
code .
If you added library to common module like react-native-svg, you have to add that library into mobile package. And nohoist array.
{
"name": "mobile",
"workspaces": {
"nohoist": [
"react-native",
"react-native/**",
"react-native-svg",
"react-native-svg/**"
]
},
"dependencies": {
"react": "16.8.6",
"react-native": "0.60.5",
"react-native-svg": "^11.0.1"
}
}
For development, you should install these CLI tools:
Zafer AYAN – @ZaferAyan – [email protected]
Distributed under the MIT license. See LICENSE
for more information.
https://github.com/ozcanzaferayan/react-native-web-template
git checkout -b feature/fooBar
)git commit -am 'Add some fooBar'
)git push origin feature/fooBar
)