React Native Boilerplate screenshot

React Native Boilerplate

Updated: 25 Jul 2020
161 Stars

A Robust React Native boilerplate to kickstart your new app :zap:

Categories

Overview

This project is a React Native boilerplate that provides an architecture optimized for building solid cross-platform mobile applications through separation of concerns between the UI and business logic. It aims to automate the process of setting up a new React Native project by including various elements and best practices learned from talented developers in the React Native Community. The boilerplate can be easily extended to suit any workflow and includes TypeScript support.

Features

  • Architecture optimized for building cross-platform mobile applications
  • Separation of concerns between UI and business logic
  • Automation of project setup process
  • Includes various elements and best practices from experienced React Native developers
  • Easily extendable to suit any workflow
  • TypeScript support
  • Integration with React, React Native, React Navigation
  • Light-weight Redux-like implementation using React Context API
  • Option to remove Redux and use other state management solutions like MobX or RxJS

Installation

To install the React Native boilerplate, follow these steps:

  1. Remove any existing git history and initialize the project with your own.
  2. Rename the project with the name and bundle identifier of your choosing (it is advised to do this in a new branch).
  3. If you want to use TypeScript, run the yarn typescript:add command to install all the TypeScript dependencies, including types for React, React Native, and React Navigation. This command will also add a tsconfig.json and jest.config.js file. Note that this feature is only tested on Linux and MacOSX.
  4. If you want to remove Redux and use another state management solution like MobX or RxJS, use the yarn redux:remove command. Make sure to configure the project files accordingly.

To run the project, follow these steps:

  1. Make sure you have all the requirements installed.
  2. Run yarn install to install the dependencies.
  3. For Android, run the appropriate command while the simulator is open or a device is connected via adb.
  4. For iOS, run the appropriate commands to install pods and run the app on the iPhone 6 simulator (device can be specified).

Summary

This React Native boilerplate provides a solid foundation for building cross-platform mobile applications, with a focus on separation of concerns and automation of project setup. It includes various best practices and elements learned from experienced React Native developers, and can be easily extended to suit any workflow. The boilerplate also supports TypeScript and allows for the removal of Redux, making it suitable for a wide range of projects. It provides a simple and efficient way to get started with React Native development.