Skip to content

inakianduaga/react-native-demo

Repository files navigation

React Native Typescript Boilerplate & Demo

Small React Native project that integrates Typescript, Redux & ImmutableJS, Jest

Features

  • Typescript integration, w/ strong compiler checks
  • Redux integration
  • Hot reloading working
  • ImmutableJS integration (redux state as Immutable Record)
  • Jest (preconfigured for typescript)
  • Redux observable for action observables
  • Redux remote devtools integration
  • Example of communication between React Native & Android Native app
  • Codepush integration (Android example only)

Quick Demo:

react-native-demo

Getting Started

Clone this repository:

git clone https://github.com/inakianduaga/react-native-demo.git
cd react-native-demo

Install dependencies:

npm install

Start React Native server (launches react native packager on port 8081 and Typescript compiler in watch mode:

npm start

Launch IOS/Android:

npm start ios
npm start android

Debugging:

  • React Native Debugger (recommended): You can have access to all redux devtools & inspection by running the native react-native-debugger application
    1. Install package for your OS of choice
    2. Launch app and enable remote JS debugger in the React Native options
    3. Launch debugger
  • Via chrome: on http://localhost:8081/debugger-ui

Upgrading React Native

To upgrade react-native to the latest version, use the package react-native-git-upgrade

  1. Install globally (locally doesn't work): npm install -g react-native-git-upgrade
  2. run react-native-git-upgrade on the root app folder

Acknowledgements:

Based on mrpatiwi/ReactNativeTS as starting point.