Code Monkey home page Code Monkey logo

react-native-base's Introduction

react-native-base travis codecov

Everything you need when starting a new react native project!

Table of contents

What's in the box?

  • React Navigation
  • Tests (using Jest & Enzyme) - Coverage 100%
  • Style Variables (for branding)
  • Constant Variables (for endpoints, external urls etc.)
  • A couple basic routes to get you started

Libraries

  • Redux +
  • React DOM +
  • Redux Logger +
  • React Native Vector Icons +
  • Enzyme +

Installation - Quick Start

Make sure you have a fresh react-native project or initialize one and then cd into the project.

react-native init MyProject
cd MyProject/

To install react-native-base it is suggested that you use the installation script:

curl -o- -L https://raw.githubusercontent.com/manosim/react-native-base/master/scripts/install.sh | bash

Installation - Manually

Create your project as usual.

react-native init MyProject
cd MyProject/

Then you will have to install the dependecies & the devDependencies.

# dependencies
npm install --save react-redux react-native-vector-icons redux 

# devDependencies
npm install --save-dev enzyme react-dom react-addons-test-utils redux-logger

Then copy the files/directories from the list below into your project.

app/
index.js

Edit index.js and replace PROJECT_NAME with your app's name.

-AppRegistry.registerComponent('PROJECT_NAME', () => AppContainer);
+AppRegistry.registerComponent('MyProject', () => AppContainer);

Finally run the link command to link react-native-vector-icons.

react-native link

That's all folks!

What is it?

React Native is amazing. Starting a new project react-native init MyProject also creates the iOS & Android projects which makes it harder(maybe impossible too?) to create a project template. The main idea is that you create your react-native project as usual and then you just copy this project's files (./app etc.), install the libraries and prepare your project for developement in no time.

Why use it?

Every time I am setting up a react-native project I have to follow pretty much the same procedure. Instead of having to copy & paste and edit files from previous projects, I made this project which aims to be a generic "template". If you are going to use react-navigation, redux and most of the libraries listed above, then react-native-base will save you lots of time.

Should I use it?

If you are familiar enough with React Native - YES. If you are not, it is still fine but note that this is not a boilerplate. You will also need some basic redux knowledge. If you don't plan to use redux, then all that's left is the implementation of the react-navigation with the tests.

react-native-base's People

Contributors

manosim avatar

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.