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.

System Requirements 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
Installing React...
Installing Jest...
[email protected] /User/localhost/AwesomeNativeBase
└── [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

Install NativeBase
npm install native-base --save

[email protected] /User/localhost/AwesomeNativeBase
└─┬ [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ ├─┬ [email protected]
  │ │ └── [email protected]
  │ └── [email protected]
  ├── [email protected]
  ├── [email protected]
  ├─┬ [email protected]
  │ └── [email protected]
  ├── [email protected]
  └─┬ [email protected]
    ├── [email protected]
    └─┬ [email protected]
      ├── [email protected]
      ├── [email protected]
      └─┬ [email protected]
        └── [email protected]

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.

iOS

Android