DEV Community

Coding Bakht
Coding Bakht

Posted on

Getting started with React Native

This is a introductory blog post for React Native Here we will learn how we can setup react native environment and we will run a simple program with react native.

Lets get Started

There are different ways to we can setup and run react native application on but here we will be using Expo for creating our react native app and we will using expo’s client application on mobile phone to run react native application but first lets see what is react native.

React Native

React native is a Javascript framework that allows you to create mobile apps it provide rich mobile user interface with the help of declarative components. The application we build with react native doesnot uses webview but rather it uses same fundamental User Interface building blocks as Android or IOS. React native helps create Crossplatform native mobile application using Javascript.
React native app

Expo

According to their website “ Expo is a free and open source toolchain built around React Native to help you build native iOS and Android projects using JavaScript and React”. Expo is not a programming language nor it is a framework rather it is toolchain. Expo is a set of tools, libraries and services you can use to build native iOS and Android apps faster than ever before.
Expo Website snapshot

Installation

npm install -g expo-cli
You run the above command on your cmd but you must have nodejs installed if you don’t have node js installed go to https://nodejs.org/en/ and download node js then run above command

Creating Project

expo init
Once you have installed expo-cli then go to the directory where you want to build application then type above command after this it will ask you to enter name of project and whether you want a blank project or a tab based template for now we will chose blank project.

Downloading Expo Client for Mobile

Expo Mobile App

Running Project

expo start
Once you have created project then type command above it will show QR code and IP address that you can use in Expo mobile app to run the application

Your First React Native Application

First React Native App
This was an introductory blog post on react native in next post we would discuss how we can create custom application and will create a simple login app and will understand the basic concept of component states and props if you want to explore more go to https://facebook.github.io/react-native/docs/getting-started this is official react native documentation
See you people soon until then
Happy Coding <3

Top comments (0)