Home

Awesome

<div align="center"> <br> <img alt="Friday App" src="./src/view/assets/images/sample/template.png" width="400px"> <h1>🚀 Friday App 🚀</h1> <strong>Build enterprise React Native apps</strong> </div> <br />

React Native Template - TypeScript

<div align="center">

Travis Code Climate iOS and Android License PRs Welcome Code Size Releases

</div>

An opinionated React Native Starter Kit with React Native Navigation + Redux + Airbnb TSLint to build iOS and Android apps using TypeScript

The project has been setup based off RN Getting Started and instructions from Microsoft's Github TypeScript React Native Starter repo.

<p align="center"> <img alt="React Native Typescript Boilerplate" src="./src/view/assets/images/sample/gif_compressed.gif" height="800px" /> </p>

Supports React 17, React Native 0.66.0, React Native Navigation v7, Flipper and Hermes

Update (Nov 2021):

UpdatesRNNRNReactComments
Nov '217.23.10.66.017.0.2Type definitions
May '217.14.00.64.117.0.1Update RN RNN, Hermes Support
Oct '207.1.00.63.316.13.1Support for Flipper
Apr '203.7.00.61.516.9.0Support for RN > 0.60, Android X
Nov '192.26.20.59.10Maintenance
Mar '192.13.10.58.616.8.4

Sponsor

I will keep supporting the projects that I have open sourced. If you have used any of my projects, for yourself or your business, I'd love your support through Github sponsors. You can also try to convince your employer to sponsor as a business.

Introduction

Jumpstart building robust apps using React Native and TypeScript with most commoly needed tools already setup. Just yarn install and get going from respective IDEs.

App Screens
SplashHomeSide Menu
Flipper Support

Flipper

Table of Contents

Project Structure

/
├── android						Android Native code
├── ios							iOS Native Code
├── shared
│   ├── redux					Applications Logic
│   │   ├── constants
│   │   ├── actions
│   │   ├── api
│   │   ├── reducers
│   │   ├── store
│   │   └── thunk
│   └── utilities
│   ├── services
│   │   ├── core				Core Services - API (fetch/axios), storage
│   │   │  ├── API
│   │   │  └── Storage
│   │   ├── home
│   │   └── search
├── src
│   ├── config					Global Configuration
│   ├── constants				Screen names and ids, Localization
│   ├── navigators				Router, Navigation
│   ├── view					UI compoments
│   │   ├── elements				Custom elements
│   │   ├── assets
│   │   ├── screens
│   │   ├── styles				Typography
│   │   └── widgets				Custom components
│   └── utilities
├── __tests__					Unit Tests
│   ├── presentation
│   └── redux
├── .babelrc
├── .gitignore
├── .travis.yml					Travis CI
├── tsconfig.json				TypeScript Configuration
├── tslint.js					TSLint configuration - extending AirBnb
├── tsconfig.json
├── app.json
├── index.js					Application Entry point
├── package.json
└── README.md

shared Everything related to application business logic. The redux store.

src Presentation layer for the app - screens, styles, images, icons etc.

Getting Started

Make sure node version installed is >=12.x.x. Then install using yarn (or npm):

yarn install

Start the Metro Bundler:

yarn start
iOS

One time. Move to ios folder and install pods:

cd ios && pod install

Launch application from XCode (Command + R) Or launch from Terminal:

yarn ios
# runs the following command. change device name here
# `npx react-native run-ios --simulator='iPhone 11'`
Android

Start an Android Simulator from:

Android Studio > Tools > AVD Manager > Run any device

Similarly, run from Android Studio itself Or from Terminal:

yarn android
# runs the following command
# react-native run-android --variant=Debug

Commands

Remark
yarn startStarts metro bundler
yarn iosStarts iOS app. Start metro bundler first
yarn androidStarts Android app. Start metro bundler and Android emulator first
yarn lintlinting
yarn lint:fixtries to fix linting issues automatically
yarn build:android:debugAndroid debug build
yarn build:android:releaseAndroid release build

Cheat Sheet

iOS Launch Screen

XCode -> Project Folder -> Click on `Images.xcassets` -> Click on `LaunchScreen`

Change the 3 images here to set the new launch screen for iOS.

Launch Screen

Android Launch Screen

`./android/app/src/main/res/drawable-*` folders

Change the images the drawable-* folders to set the new launch screen for Android.

M1 support

Some additional steps may be required for project to work on M1.

sudo arch -x86_64 gem install ffi
arch -x86_64 pod install

Now try and run CocoaPods.

P.S.: Thanks to samanthadotcom#7043 (discord)

Single Screen vs Tabbed Based Navigation

The application launches with a splash screen, and then moves to a tabbed based navigation. Splash screen is a good place to fetch data / build application launch logic like getting user token from API or Async Store, load persist state etc.

For Single screen application, replace this tabbed based navigation with a single screen - just home, or simply use the splash screen to setup the app, may be with a burger menu.

Renaming the App

You might also want to rename the app for your own use. Follow any of the links below.

Or

Contributing

Please check out Contributing.

Authors

See also the list of contributors.