Giter Site home page Giter Site logo

psychobolt / react-native-boilerplate Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jhen0409/react-native-boilerplate

0.0 3.0 1.0 4.68 MB

Fork of react-native-boilerplate that provides Reactive Extensions, NativeBase, React Intl, and VS Code support

License: MIT License

Python 3.96% Java 3.19% JavaScript 80.95% Objective-C 10.63% Shell 1.27%

react-native-boilerplate's Introduction

React Native Boilerplate

Build Status CircleCI codecov ES Doc Coverage

Dependency Status devDependency Status

Stories in Ready

The React Native, Redux boilerplate for personal usage. It also includes a example app which utilizes React Navigation, Native Base, Redux, and supports Remote Redux DevTools control.

Screenshots

iOS

iOS preview

Android

Android preview

Included

Installation

See Getting Started to install required tools.

$ npm install -g react-native-cli
$ npm install # install npm packages. Required for every package.json update

Development

Start local server

$ npm start

iOS

Run command to open iOS simulator and run app:

$ npm run ios

Android (5.0+)

Open Android emulator and run command: (Or connect real device via USB)

$ npm run android

For Windows with Hyper-V enabled, download and install Visual Studio Android Emulator. You should run a Android device Marshmallow (6.0.0) API Level 23. Next, configure Internet Connection for the device. See Enable Internet Connection for instructions. For network access to debugger, you also need to install and configure Telerik Fiddler. After setup, shake the emulator to display the Developer Menu (Tools > Shake > Play).

DevTools

In development mode, you can install React Native Debugger as default debugger. if not install, it will use Remote Redux DevTools and On Debugger. As an alternative, you can install Visual Studio Code with Extensions.

Remote JS Debuggging and Hot Reload

Don't forget to Enable Remote JS Debugging and Hot Reload in your application running in the Device Emulator. This can be configued from the Developer Menu (Command+D on Mac).

Visual Studio Code

It might be better to debug in a lightweight IDE. Visual Studio Code provides a few extensions to debug React Native applications. Under extensions, install Flow Language Support, ESLint, React Native Tools, and Redux DevTools. Make sure to configure local (custom) server for Redux DevlTools (host: localhost, port: 5678)

You may need to install Flow globally: npm install -g flow-bin

File Convention

This project is organized using conventions borrowed from Angular Seed Advanced. Most specifically, filenames are postfixed before the file extension e.g.:

- *.i18n.js
- *.style.js
- *.theme.js
- *.container.js
- *.component.js
- *.reducers.js
- *.[_type_].js
- *.[_type_]-test.js

To support a clean hiearchy and easy search, "*" is replaced with component name and all associated files placed in a directory with the compoennt name, along with the index.js (JS module export file).

Project Structure

The project is divided into two three parts: App/, Framework/, and Shared/:

  1. App - Code that handles interaction and display of the mobile app.
  2. Framework - Independent code, where you will be mainly be concern with your projects.
  3. Shared - Any code that is shared between App and Framework (usually utility classes or functions).

Testing

We used react-native-mock, and test with Jest, Enzyme.

$ npm test

Updating Snapshot tests

$ npm test -- -u

When appropriate, you should commit and push the new snapshots

Running Tests w/ coverage report:

$ npm test -- --coverage

Running ESLint:

$ npm run lint

API Docs

Generate documentation with coverage

$ npm run esdoc

Local generated docs are at doc/.

Credits

LICENSE

MIT

react-native-boilerplate's People

Contributors

grifotv avatar jhen0409 avatar psychobolt avatar waffle-iron avatar

Watchers

 avatar  avatar  avatar

Forkers

waffle-iron

react-native-boilerplate's Issues

Roadmap

  • Support internationalization
  • Validation library

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.