Skip to content

This is an example of React Native Application build with Ignite (Bowser). We included in this example React-Navigation 4.0 and samples of tab navigation, drawer navigation, stack navigation, and authentication flow.

Notifications You must be signed in to change notification settings

3MetasOS/React-Native-App

Repository files navigation

React Native App Template.

Ignite Bowser boilerplate with react-navigation 4.0 and navigation samples.

This is the boilerplate that Infinite Red uses as a way to test bleeding-edge changes to their React Native stack.

Yes, it is. So we took a generated with ignite project and upgraded the react-navigation to version 4.0 and also included examples of tab navigation, switch navigation, stack navigation, and drawer navigation.

Also, it is important to mention that this a functional component sample. Basically, all you can find online are class componentes, so we thought it is worth. Have fun. your friends at 3Metas.

Currently includes:

  • React Native
  • React Navigation 4.0
  • MobX State Tree
  • TypeScript
  • And more!

Quick Start

The Ignite Bowser boilerplate project's structure will look similar to this:

ignite-project
├── app
│   ├── components
│   ├── i18n
│   ├── utils
│   ├── models
│   ├── navigation
│   ├── screens
│   ├── services
│   ├── theme
│   ├── app.tsx
├── storybook
│   ├── views
│   ├── index.ts
│   ├── storybook-registry.ts
│   ├── storybook.ts
├── test
│   ├── __snapshots__
│   ├── storyshots.test.ts.snap
│   ├── mock-i18n.ts
│   ├── mock-reactotron.ts
│   ├── setup.ts
│   ├── storyshots.test.ts
├── README.md
├── android
│   ├── app
│   ├── build.gradle
│   ├── gradle
│   ├── gradle.properties
│   ├── gradlew
│   ├── gradlew.bat
│   ├── keystores
│   └── settings.gradle
├── ignite
│   ├── ignite.json
│   └── plugins
├── index.js
├── ios
│   ├── IgniteProject
│   ├── IgniteProject-tvOS
│   ├── IgniteProject-tvOSTests
│   ├── IgniteProject.xcodeproj
│   └── IgniteProjectTests
├── .env
└── package.json

./app directory

Included in an Ignite boilerplate project is the app directory. This is a directory you would normally have to create when using vanilla React Native.

The inside of the src directory looks similar to the following:

app
│── components
│── i18n
├── models
├── navigation
├── screens
├── services
├── theme
├── utils
└── app.tsx

components This is where your React components will live. Each component will have a directory containing the .tsx file, along with a story file, and optionally .presets, and .props files for larger components. The app will come with some commonly used components like Button.

i18n This is where your translations will live if you are using react-native-i18n.

models This is where your app's models will live. Each model has a directory which will contain the mobx-state-tree model file, test file, and any other supporting files like actions, types, etc.

navigation This is where your react-navigation navigators will live. And here we made changes to include the Auth Workflow and all the navigation components.

screens This is where your screen components will live. A screen is a React component which will take up the entire screen and be part of the navigation hierarchy. Each screen will have a directory containing the .tsx file, along with any assets or other helper files.

services Any services that interface with the outside world will live here (think REST APIs, Push Notifications, etc.).

theme Here lives the theme for your application, including spacing, colors, and typography.

utils This is a great place to put miscellaneous helpers and utilities. Things like date helpers, formatters, etc. are often found here. However, it should only be used for things that are truely shared across your application. If a helper or utility is only used by a specific component or model, consider co-locating your helper with that component or model.

app.tsx This is the entry point to your app. This is where you will find the main App component which renders the rest of the application. This is also where you will specify whether you want to run the app in storybook mode.

./ignite directory

The ignite directory stores all things Ignite, including CLI and boilerplate items. Here you will find generators, plugins and examples to help you get started with React Native.

./storybook directory

This is where your stories will be registered and where the Storybook configs will live

./test directory

This directory will hold your Jest configs and mocks, as well as your storyshots test file. This is a file that contains the snapshots of all your component storybooks.

Running Storybook

From the command line in your generated app's root directory, enter yarn run storybook This starts up the storybook server.

In app/app.tsx, change SHOW_STORYBOOK to true and reload the app.

For Visual Studio Code users, there is a handy extension that makes it easy to load Storybook use cases into a running emulator via tapping on items in the editor sidebar. Install the React Native Storybook extension by Orta, hit cmd + shift + P and select "Reconnect Storybook to VSCode". Expand the STORYBOOK section in the sidebar to see all use cases for components that have .story.tsx files in their directories.

Premium Support from ignite

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

About 3Metas

We are a Digital Strategy company building apps, services, and platforms for people and customers around the globe.

Powered By 23Blocks

With Love from Boulder, CO.

About

This is an example of React Native Application build with Ignite (Bowser). We included in this example React-Navigation 4.0 and samples of tab navigation, drawer navigation, stack navigation, and authentication flow.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published