Getting Started with NativeBase

Quick Setup

To have NativeBase components running onto your native apps, all you need to do is create a fresh React Native project and install the NativeBase command line tools.

NOTE: Before you move to installation of NativeBase, make sure that you have React Native CLI installed into your system. The React Native command line tools allow you to easily create and initialize projects.
Create React Native project
react-native init AwesomeNativeBase

This will walk you through creating a new React Native project in /User/localhost/AwesomeNativeBase
Installing react-native package from npm...
Setting up new React Native app in /User/localhost/AwesomeNativeBase
[email protected] node_modules/react
├── envify@3.4.0 ([email protected], [email protected])
└── fbjs@0.6.1 ([email protected], [email protected], [email protected], [email protected], [email protected])

To run your app on iOS:
    cd /User/localhost/AwesomeNativeBase
    react-native run-ios
    - or -
    Open /User/localhost/AwesomeNativeBase/ios/AwesomeNativeBase.xcodeproj in Xcode
    Hit the Run button
To run your app on Android:
    Have an Android emulator running (quickest way to get started), or a device connected
    cd /User/localhost/AwesomeNativeBase
    react-native run-android

cd AwesomeNativeBase
npm install

Install NativeBase
npm install native-base --save

[email protected] /Users/localhost/AwesomeNativeBase
├─┬ [email protected]
│ ├─┬ [email protected]
│ │ ├── [email protected]
│ │ └─┬ [email protected]
│ │   └── [email protected]
│ ├── [email protected]
│ ├── [email protected]
│ └── [email protected]
└── UNMET PEER DEPENDENCY [email protected]~1.3.4

You've successfully setup NativeBase with your React Native app. Your React Native app is now all set to run on iOS and Android simulator.

Installing Peer Dependencies

The peer dependencies included from any npm package does not automatically get installed. Your application will need to depend on it explicitly. NativeBase includes React Native Vector Icons as one of its peer dependency. So here we help you with the setup.