kevinnguy / react-client

A template for setting up a React client app for web and mobile (react-native & react-native-web)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-client

A template for setting up a React client app repo

Supports:

  • Web (react-native-web)
  • Mobile (react-native)

Table of contents

Repo setup

  • Fork this repo

Install dependencies

  1. Run yarn install (or just yarn)

    • Make sure yarn postinstall runs successfully
  2. Run yarn pod-install to install iOS dependencies

Running the app

  • On iOS: yarn ios
  • On Android: yarn android
  • Start Metro bundler: yarn start
    • Running yarn ios/yarn android will automatically start Metro if it's not already running.

Running tests

  • Run unit tests: yarn test
  • Run E2E tests: yarn detox:build && yarn detox:(ios | android)

Setup React Native development

Installing dependencies

  • Install brew: https://brew.sh
  • Install yarn: brew install yarn
  • Install watchman: brew install watchman
  • Install nvm: brew install nvm
    • Please follow additional instructions in Caveats after brew installing. You will need to update your shell config file(~/.bashrc, ~/.zshrc)
    • You can optionally integrate nvm to detect which node veresion to use when changing directories: https://github.com/nvm-sh/nvm
  • Install node: nvm install && nvm use
    • Running node -v should match .nvmrc

iOS

Setup Xcode

Download the latest version of Xcode from the Mac App Store. If you need an older version of Xcode, visit: https://developer.apple.com/download/more/?=xcode.

Android

  • Install Java SDK >= 8: brew install --cask adoptopenjdk/openjdk/adoptopenjdk8
    • Verify you're on version 8: java -version
  • Install Android Studio

Follow up-to-date guide on https://reactnative.dev/docs/environment-setup

About

A template for setting up a React client app for web and mobile (react-native & react-native-web)


Languages

Language:Java 30.3%Language:Objective-C 21.6%Language:TypeScript 15.1%Language:JavaScript 14.6%Language:HTML 8.4%Language:Ruby 3.7%Language:Shell 3.4%Language:Starlark 2.9%