Skip to content

Latest commit

 

History

History
executable file
·
61 lines (49 loc) · 2.38 KB

GetStarted.md

File metadata and controls

executable file
·
61 lines (49 loc) · 2.38 KB

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

  • Globally installed node >= 6.0
  • Globally installed npm >= 4.0
  • Globally installed React Native CLI which allow you to easily create and initialize projects.
  • Click here to know about React Native version compatibility with NativeBase.

Create React Native project

react-native init AwesomeNativeBase
cd AwesomeNativeBase

Install NativeBase

npm install native-base --save

Install Peer Dependencies
The peer dependencies included from any npm packages does not automatically get installed. Your application will not depend on it explicitly.

react-native link

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.

Gif/video of a init new projet and adding a Button component to a new blank project(iOS and Android) goes here

Setup with CRNA

Create React Native project using the CRNA cli.
CRNA helps you make React Native apps with no build configuration. Create React App works on macOS, Windows, and Linux.
Refer to this link for additional information CRNA

Install NativeBase

npm install native-base --save

Install @expo/vector-icons

npm install @expo/vector-icons --save

**Note**
NativeBase uses some custom fonts that can be loaded using **loadAsync** function. Check out [this](https://docs.expo.io/versions/v15.0.0/sdk/font.html#expofontloadasyncname-url) expo link.
Synatax
```js async componentWillMount() { await Expo.Font.loadAsync({ 'Roboto': require('native-base/Fonts/Roboto.ttf'), 'Roboto_medium': require('native-base/Fonts/Roboto_medium.ttf'), }); ```
Check out the [KitchenSink](https://github.com/GeekyAnts/NativeBase-KitchenSink/blob/CRNA/js/setup.js) with CRNA for an example of the implementation.