Skip to content

david1820/react-native-boilerplate

Repository files navigation

React Native Boilerplate: Apollo - Redux - React Navigation

Overview

This is a boilerplate application for building apps with react-native created from react-native init. Using Apollo, Redux and React Navigation. Helps you stay productive by following best practices

Inspired from React-boilerplate - A highly scalable, offline-first foundation with the best developer experience and a focus on performance and best practices .

Features

Feature Summary
Generators Allows you to auto-generate boilerplate code for common parts of your application, specifically components, containers and routes navigations
Apollo Apollo client: The flexible, production ready GraphQL client for React and native apps.
Redux Redux is a predictable state container for JavaScript apps.
Reselect Reselect is a simple “selector” library for Redux.
Redux Logger Redux Logger is a logger for Redux.
React Navigation React Navigation start quickly with built-in navigators that deliver a seamless out-of-the box experience.
Code Linting JavaScript code linting is done using ESLint - a pluggable linter tool for identifying and reporting on patterns in JavaScript.

Change App name

Default name is 'boilerplate' and if you open your project on Xcode or Android Studio this is how you see its name, to change it follow the next steps:

  • First make a copy of the react-native-boilerplate directory. And go to your newly cloned directory.
  • Change the app name at index.ios.js and index.android.js files which is given as a parameter to AppRegistry.
// Change this line
change AppRegistry.registerComponent('boilerplate', () => App);

// To this
AppRegistry.registerComponent('your-desire-app-name', () => App);
  • Change the name and version accordingly on cloned-directory/package.json
// Change this
{
  "name": "boilerplate",
  "displayName": "boilerplate"
}

// To this
{
  "name": "your-desire-app-name",
  "displayName": "your-desire-app-name"
}
  • Delete /ios and /android folders which are remaining from your older app.
  • To generate /ios and /android folders again run.
react-native upgrade
  • For any native dependency run.
react-native link
  • Finally run react-native run-ios or anything you want.

Getting Started

Clone the repo:

git clone
cd boilerplate

Install dependencies:

npm install

npm run setup

Start the app:

# Start android app
react-native run-android

# Start iOS app
react-native run-ios

Generators:

# Run generator menu
npm run generate

License

This project is licensed under the MIT License

Info

David González – david.1820@gmail.com

About

React Native - Boilerplate (Apollo -Redux - React Navigation)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published