Git Product home page Git Product logo

rn_web_monorepo's Introduction

React Native Web, iOS, Android Monorepo

Monorepos are good for lean development with limited resources. One repo builds your app for iOS and Android, and for web. The code is shared in the Components folder, any changes you make there will be available across all platforms.

Orginal Work is brunolemos's repo on the subject. I needed to rename a lot of the files, and will not be submitting PR's from my project, so I'm starting my own.

How to run

Requirements:

React Native

Yarn

Android Studio

XCode

  • $ git clone [email protected]:reallynotburner/rn_web_monorepo.git
  • $ cd rn_web_monorepo
  • $ yarn

To see your app running in iOS or Android:

  • $ yarn mobile

For iOS open up rn_web_monorepo/packages/mobile/ios/rn_web_monorepo.xcodeworkspace with XCode and hit the Play button.
For Android up open up rn_web_monorepo/packages/mobile/android with Android Studio and hit the play button.

To see you app running in Web

  • $ yarn web

Your web app is served on localhost:3000.

Also consider Ben Awad's Tutorial on Youtube, his focus being React Hooks and Typescript.

See ReNative which has excellent CLI's to build projects across many other platforms, again, with much code reuse.

Also see Expo CLI which has a lot of built-in support for the mono-repo approach, including extremely valuable push notification, and on-air updating for the mobile targets.

rn_web_monorepo's People

Contributors

reallynotburner avatar dependabot[bot] avatar

Stargazers

Oz Shemesh avatar

Watchers

Oz Shemesh avatar  avatar

rn_web_monorepo's Issues

Incompatible with React-navigation

I worked on this all day, could not get react-navigation working with this monorepo. I can do it with default RN projects, npx react-native init AwesomeProject, then following the install steps per:

https://reactnavigation.org/docs/en/getting-started.html

yarn add react-navigation -W
yarn add react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context -W
yarn add react-navigation-stack @react-native-community/masked-view
yarn (which runs Pod install)

All kinds of googling and experimenting, manually trying to install modules to solve for many many errors in native display.

I mean it's patently absurd to demand consumers of react-navigation to not be able to use in unless you manually install all these manual dependencies. I haven't encountered anything so ridiculous before with a react dependency.

For now, I give up. use https://renative.org/. It's hello-world template includes basic navigation setup.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.