DEV Community

Cover image for React Native - The Setup
Jason Lee
Jason Lee

Posted on

React Native - The Setup

Setting up react native

I'll save the explanation for every tiny detail in the setup.
Here is the link to the doc for the setting up:
React Native Environment Setup

Questions, Difficulties && Tips during the setup

1. What is the difference between EXPO CLI & React Native CLI? Problems I had with Expo.

A CLI(command line interface)is a command-line program that accepts text input to execute operating system functions.

Expo is faster to setup and easier to share amongst people.
The downside is that expo is not able to use some native modules or APIs.

I started off with Expo, but when I was trying to use the vector Icons, I had to add some code in a file in the android folder which the project created via expo did not contain.

Apparently, modules that use react-native link is unavailable on an expo created project.

Reference StackOverflow && Documentation

2. The environmental variable - Android_Home

For anyone out there that doesn't know where to find the sdk file on a windows device (Shamefully raising my hand)
Here's how:

  1. Go to your C disk and click on the Users folder and open your user folder.
  2. According to the react-native doc we need to look for the AppData folder. Someone suggested changing the option for the window to show hidden files, but the easiest method is to click the navigation bar two times and add a "/AppData" so it should look something like this "C:\Users[yourUser]\AppData".
  3. Continue down to ".\Local\Android" and there you have it.

After adding the variable, you can use:
"Get-ChildItem -Path Env:\"
in the PowerShell to check whether it has been successfully added.

3. React Bootstrap is unusable

I wasted the biggest chunk of my time trying to figure out how to get React Bootstrap to work in the native app. Because of using react-bootstrap for almost two months, I was hoping to be able to use it but sadly, I was unable to make it work.
Although bootstrap is unavailable, react-native has components that we can use that are similar to react-bootstrap. Native Base is what I continued to work with. After playing around with Native Base, I found that React-native itself also had interesting components too.

Next Blog: After I finish up the project

Top comments (0)