gko / react-native-web-monorepo

Code sharing between iOS, Android & Web using monorepo

Home Page:https://dev.to/brunolemos/tutorial-100-code-sharing-between-ios-android--web-using-react-native-web-andmonorepo-4pej

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

React Native [Web] + Monorepo

100% code sharing between Web, iOS and Android

This is the source code from this tutorial.

article-cover

How to run

Requirements: React Native (last tested on react-native@0.61)

  • $ git clone git@github.com:brunolemos/react-native-web-monorepo.git
  • $ cd react-native-web-monorepo
  • $ yarn
  • $ cd packages/mobile/ios
  • $ pod install
  • $ cd -
  • $ yarn workspace web start
  • $ yarn workspace mobile start
  • 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: @brunolemos

Who is using this on production

Check out DevHub. The main difference is that it supports Desktop (Electron) in addition to Web, iOS and Android.

DevHub Desktop

DevHub Menubar

DevHub Mobile - Notifications DevHub Mobile - Notification Filters DevHub Mobile - Events


About

Code sharing between iOS, Android & Web using monorepo

https://dev.to/brunolemos/tutorial-100-code-sharing-between-ios-android--web-using-react-native-web-andmonorepo-4pej


Languages

Language:Objective-C 21.8%Language:TypeScript 18.1%Language:Ruby 15.5%Language:Java 13.8%Language:JavaScript 11.4%Language:Python 10.0%Language:HTML 8.6%Language:CSS 0.8%