infinitered / ignite-andross

The original React Native boilerplate from Infinite Red - Redux, React Navigation, & more
https://infinite.red/ignite
MIT License
474 stars 150 forks source link
boilerplate navigation navigation-component react react-native redux redux-saga storybook

logo

Ignite "Andross" Boilerplate

Why is this archived?

We really appreciate all the community support in the years since we first released ignite-andross. Our focus has shifted to the latest version of Ignite, which includes the latest version of our boilerplate. Feel free to fork this library and continue on its legacy if you want.

NOTE: This repo has been renamed from ignite-ir-boilerplate-andross to ignite-andross. Although web traffic and git operations for the previous name will be redirected, we recommend you update any links and git urls for this repo.

The original tried and true boilerplate for Infinite Red's React Native apps

Currently includes:

Quick Start

When you've installed the Ignite CLI, you can get started with this boilerplate like this:

npx ignite-cli new MyLatestCreation

By default we'll ask you to choose which boilerplate you'd like. If you just want to use this one you can specify it with --boilerplate or -b:

npx ignite-cli new MyLatestCreation --boilerplate andross

You can also change the React Native version; just keep in mind, we may not have tested this just yet.

npx ignite-cli new MyLatestCreation --react-native-version 0.99.0-rc.2

By default we'll ask you some questions during install as to which features you'd like. If you just want them all, you can skip the questions:

npx ignite-cli new MyLatestCreation --max

If you want very few of these extras:

npx ignite-cli new MyLatestCreation --min

Boilerplate walkthrough

Your App folder is where most of the goodies are found in an Ignite Next app. Let's walk through them in more detail. Start with Containers/App.js (described below) and work your way down the walkthrough in order.

Containers

Containers are (mostly) full screens, although they can be sections of screens or application containers.

To generate a new Container or Screen you can use the following generator commands:

Those commands will also add the new container to the navigations file.

Navigation

Your primary and other navigation components reside here.

Components

React components go here...pretty self-explanatory. We won't go through each in detail -- open each file to read the comments and view the code.

To generate a new Component you can use the following generator commands:

Storybook

Storybook has been setup to show off components in the different states. Storybook is a great way to develop and test components outside of use in your app. Simply run npm run storybook to get started. All stores are contained in the *.story.js files along side the components.

Themes

Styling themes used throughout your app styles.

Config

Initialize and configure things here.

Fixtures

Contains json files that mimic API responses for quicker development. These are used by the Services/FixtureApi.js object to mock API responses.

Redux, Sagas

Contains a preconfigured Redux and Redux-Sagas setup. Review each file carefully to see how Redux interacts with your application.

Here again we have generators to help you out. You just have to use one of the following:

You can read more about Redux and Redux Sagas in these blog posts:

Services

Contains your API service and other important utilities for your application.

Lib

We recommend using this folder for modules that can be extracted into their own NPM packages at some point.

Images

Contains actual images (usually png) used in your application.

Transforms

Helpers for transforming data between API and your application and vice versa. An example is provided that you can look at to see how it works.

Tests

This folder (located as a sibling to App) contains sample Jest snapshot and unit tests for your application.

If you would like to have the npx ignite-cli generate command include the generation of tests when available, add "tests": "jest" or "tests": "ava" to ./ignite/ignite.json, depending on the test runner you are using.

Previous Boilerplates

Premium Support

Ignite CLI and Ignite Andross, as open source projects, are free to use and always will be. Infinite Red offers premium Ignite CLI support and general mobile app design/development services. Email us at hello@infinite.red to get in touch with us for more details.