Code Monkey home page Code Monkey logo

react-native-boiler-plate's Introduction

React-native boiler-plate

Build Status

A heavily-opinionated react-native, redux, redux-saga and firebase boilerplate project used in our production apps.

Getting started

Follow the Setup guide.

What's in the box?

  • ESLint and Prettier
  • Multiple Firebase environments (development, production etc.)
  • Auth (all of it besides phone authentication)
  • Realtime database
  • Firestore
  • Cloud storage
  • Push notifications
  • Network and system message management
  • Image handling, caching and resizing
  • Location
  • Permissions
  • Redux store persistence
  • Automated beta app distribution thanks to fastlane
  • A collection of useful docs (seen below)
  • Code-Push

In the pipeline

  • We have all the bells and whistles we need for now

Docs

Feel free to get in touch if you have questions or suggestions :)

react-native-boiler-plate's People

Contributors

dependabot[bot] avatar shaunsaker avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-native-boiler-plate's Issues

Better sagas testing

Some of the saga tests are irrelevant for the service that they are testing. ie. without a response from the API. Does that ever happen? Is it even necessary to test that case?

Add data shapes to initialState

Serves as self-documentation, ie.

network: null

is far less descriptive than

network: {
  type: null,
  effectiveType: null
}

E2E testing

Detox seems to be the most mature, easier to use library out there right now.

Components should be index.js

ie. Currently we have

Example
  index.js
  Example.js

which is unnecessary and should be corrected to:

Example
  index.js

The same concept should be applied to utils to make tests more explicit.

Update docs

Navigating the docs is tedious. Add TOCs.

Write unit tests for some of the services and sync saga

I have not been able to write tests for the following services (due to a lack of expertise on my part):

  • getDeviceLocation
  • resizeImage
  • showImagePicker
  • UploadFile
  • All database services
  • Sync saga, specifically testing that the eventChannel works

Looking for help here.

Update TOOLS

Deployment should include firebase env.

Also, the headings aren't formatted consistently.

Consider using redux-saga-routines

https://github.com/afitiskin/redux-saga-routines

We are currently dispatching actions directly from sagas and not using action creators. This library abstracts that boilerplate away and you end up with 5 actions for each phase of an async action, ie. trigger, request, success, failure, fulfill. This approach is considered best practice and it is definitely an improvement to our current setup.

Setup continuous integration

Once unit testing is incorporated, it would be great to have these tests run on PR's and builds automatically deployed to beta on merge into master.

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.