An open API service indexing awesome lists of open source software.

https://github.com/mukhammadali/react-native-monorepo

Share code between Web and React Native
https://github.com/mukhammadali/react-native-monorepo

monorepo react react-native react-native-monorepo react-native-web react-native-web-monorepo

Last synced: about 1 month ago
JSON representation

Share code between Web and React Native

Awesome Lists containing this project

README

          

# React Native [Web] + Monorepo

### This repository was inspired by [react-native-web-monorepo](https://github.com/brunolemos/react-native-web-monorepo). Huge thanks to Brunolemos!

What is different?

- Added absolute path resolving
- Fixed VsCode Intellisense (CMD+MOUSE CLICK now opens correct file instead of d.ts files)
- Fixed VSCode Auto importing based on typings.
- now VSCode can suggest and import from correct path while you are writing your code
- A bit different structure
- apps live under **/apps**
- other utility packages live under **/packages**

## 100% code sharing between Web, iOS and Android

This is the source code from [this tutorial](https://dev.to/brunolemos/tutorial-100-code-sharing-between-ios-android--web-using-react-native-web-andmonorepo-4pej).

![article-cover](https://user-images.githubusercontent.com/619186/64933790-1fc27680-d81d-11e9-8077-64a1066b7c17.png)

### How to run

_Requirements: [React Native](https://facebook.github.io/react-native/docs/getting-started.html#native) (last tested on react-native@0.61)_

- `$ git clone https/github.com/Mukhammadali/react-native-monorepo.git`
- `$ cd react-native-monorepo`
- `$ yarn`
- `$ cd apps/mobile/ios`
- `$ pod install`
- `$ cd -`
- `$ yarn ios`
- `$ yarn web`
- Run the project
- [iOS] Via Xcode
- `yarn xcode` (open the project on Xcode)
- Press the Run button
- [Android] Via Android Studio
- `yarn studio` (open the project on Android Studio)
- Press the Run button
- Via CLI
- _You may need to launch your device emulator before the next command_
- `$ yarn android` or `$ yarn ios`

### Author

Follow me on Twitter: [@_mukhammadali](https://twitter.com/_mukhammadali)