Giter Site home page Giter Site logo

victorkvarghese / react-native-feature-boilerplate Goto Github PK

View Code? Open in Web Editor NEW
196.0 12.0 65.0 2.46 MB

Feature based Architecture for developing Scalable React Native Apps ๐Ÿš€ using react, redux, sagas and hooks

License: MIT License

JavaScript 45.14% Starlark 1.99% Java 20.63% Ruby 17.65% Objective-C 14.58%
react react-native react-navigation redux redux-saga reselect redux-persist react-native-boilerplate react-boilerplate react-redux react-redux-boilerplate

react-native-feature-boilerplate's Introduction

๐Ÿš€ React Native Feature Boilerplate - April 2020

React Native React Navigation V5

React NativeFeature Boilerplate is a starting point for React Native application. This project is configured with redux, redux saga and redux persist. Uses latest version of react-navigation (v5)

Redux Logo

Redux Logo

Redux Logo

Scalability Factor

This Architecture is optimised for large scale projects. If you are beginner who just started using react native, I would suggest starting with a type based architecture and slowly switching to this architecture.

React-Native-BoilerPlate for beginners.

Features

Prerequisites

Project Structure

  • /app - Contains our React Native App codebase
    • /api - Api module class. Each file will be feature based like ProductAPI, LoginAPI etc
    • /components - universal shared components used by others.
    • /config - Universal styles,images,metrics etc..
    • /features - Config files
      • login- Each folder will be a feature like this.
        • reducers - Reducer associated with this feature [Mostly one, can be multiple]
        • sagas - Sagas related with this particular feature [can have single or muliple sagas associated]
        • selectors - selectors associated with feature
        • components - Components associated with this feature.
        • containers - Containers associated with this feature [Container - Component Structure]
    • /lib - lib helper files
    • /navigation - All naviagtion related stuff including helpers functions and navigation stack
      • NavigationService.js - Service class for navigation - can be used without using props
      • NavigationStack.js - Stack to define naviagtion. you can split things further if needed
    • /store - Includes everything you need to set up store.
      • reducers - Combines all feature based reducers
      • sagas - Combines all feature based sagas
      • index.js - Set ups store and export things

Getting Started

  1. Clone this repo, git clone https://github.com/victorkvarghese/react-native-boilerplate.git <your project name>
  2. Go to project's root directory, cd <your project name>
  3. Remove .git folder, rm -rf .git
  4. Use React Native Rename to update project name $ npx react-native-rename <newName>
  5. Run yarn or npm install to install dependencies
  1. Start the packager with npm start
  2. Connect a mobile device to your development machine
  3. Run the test application:
  • On Android:
    • Run react-native run-android
  • On iOS:
    • Open ios/YourReactProject.xcworkspace in Xcode
    • Hit Run after selecting the desired device
  1. Enjoy!!!

Contributing

PRs are welcome

react-native-feature-boilerplate's People

Contributors

dependabot[bot] avatar hemel-cse avatar rajanjs avatar victorkvarghese avatar

Stargazers

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

Watchers

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

react-native-feature-boilerplate's Issues

unable to run the project.

My environment is perfectly set up and I tried to run other projects they are running perfectly fine. Please find the error below.

error Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:

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.