Skip to content

daviddang91/react-native-redux-starter-kit

Repository files navigation

React Native Redux Starter Kit

A starter boilerplate for a mobile app using React Native and Redux.

Dependency Status devDependency Status

Demo (Account: demo@gmail.com / 123456)

demo

Requirements

See Getting Started to install requirement tools.

Stack

Libraries

Get Started

1. Installation

On the command prompt run the following commands

$ git clone git@github.com:daviddang91/react-native-redux-starter-kit.git

$ cd react-native-redux-starter-kit/

$ npm install

2. Simulate for iOS

Method One

  • Open the project in Xcode from ios/ReactNativeStarter.xcodeproj.

  • Hit the play button.

Method Two

  • Run the following command in your terminal.
$ react-native run-ios

3. Simulate for Android

  • Make sure you have an Android emulator installed and running.

  • Run the following command in your terminal.

$ react-native run-android

Setup ES6+Babel+JSX Linting with Atom/Nuclide

This sets up Atom to properly lint ES6+Babel+JSX using Airbnb's .eslintrc as a starting point.

Steps

  1. Download Atom and get these two packages: Linter and Linter-ESLint
  2. Run npm i -D eslint eslint-config-airbnb babel-eslint eslint-plugin-babel eslint-plugin-react eslint-plugin-react-native eslint-plugin-import eslint-plugin-jsx-a11y from your project root.
  3. Add "extends": "airbnb" to your .eslintrc and "plugins": [ "babel", "react", "react-native", "jsx-a11y" ]
  4. Run apm install linter-eslint this also installs linter which clashes with nuclide diagnostics
  5. Run apm disable linter to stop the linter clashing with nuclide

See Airbnb's Javascript styleguide and the ESlint config docs for more information.

Data Persistence

Debugger

Rename Project

Rename react-native app with just one command

react-native-rename

This package assumes that you created your react-native project using react-native init.

Installation

yarn global add react-native-rename
or
npm install react-native-rename -g

Switch to new branch first

better to have back-up

git checkout -b rename-app

Usage

react-native-rename <newName>

With custom Bundle Identifier (Android)

react-native-rename <newName> -b <bundleIdentifier>

Example

react-native-rename "Travel App"

With custom Bundle Identifier

react-native-rename "Travel App" -b com.junedomingo.travelapp