Getting started with React native

It's been a long time since i have posted anything in this blog. I have been trying react-native for the last 3 months. And it's been a wonderful experience. From a Angular background it seemed difficult to adopt react initially. Once i got it, it seems very easy and interesting. About the performance of RN is just awesome.
I am using
 Windows 10 
Installation is pretty simple. There are two ways to create an application, using expo-cli and react-native-cli. I prefer the second one. It seems like a little complex but when developing large application it's the best way to start.

As a prerequisite we need to install nodeJS, Python, JDK and need to setup Android. We need to install react-native-cli globally for creating and running the project
 npm install -g react-native-cli

Once you install the cli we can create the application.
 react-native init firstProject
After creating the application we can move into the application folder and run the application. Before running the application we need a running emulator or a device connected to the system.
cd firstProject 
react-native run-android
Voila you could see the application in the emulator/device.

Debugging is pretty easier. There is remote debugging is possible in RN. On emulator just run
Ctrl + M 
it will show menu with "Debug JS Remotely". Select the option it will open the debugger window on the browser. If the debugger not loading try

On Device run the following command on the shell
 adb shell input keyevent 82

Network Debug
Debugging the http network is little bit tricky. I use Reactotron which is basically a good way to check the request/response of each http calls. In Windows for installing got the releases page and download the appropriate zip. Unzip it in a convenient place and add the folder it to the ENVIRONMENT VARIABLES. Once you added, you can run the app from bash/command. Before running you need import config file in the index.js or app.js. I generally add in the index.js.
You need to install the reactotron-react-native
npm install reactotron-react-native --save-dev
Sample config file looks something like this
 import Reactotron from 'reactotron-react-native';

  .configure() // controls connection & communication settings
  .useReactNative() // add all built-in react native plugins
  .connect() // let's connect!
Also you may have to run the following command to connect to the port
 adb reverse tcp:9090 tcp:9090
On Production release you have to comment the import unless it will have some performance issues.

So that's it. Try react-native!


Amy Wong said…
Listen, they advised me that this site well free online casino said that it’s not the scam that I decided to take the risk for and while everything was fine and you were on this site?
Tony Chew said…
Kriteria kartu jackpot poker online Royal Flush >> Mendapatkan bonus jackpot sebesar 80% dari total jackpot di meja. Straight Flush >> Mendapatkan bonus jackpot sebesar 30% dari total jackpot di meja. Four of a Kind >> Mendapatkan bonus jackpot sebesar 10% dari total jackpot di meja.
bandar ceme terbaik
paito warna terlengkap
syair sgp
Nice Post thanks for the information, good information & very helpful for others. flipkart lucky draw For more information about Online Shopping Lucky Winner, Flipkart, HomeShop18, Shopping Lucky, Draw, Contest, Winner, Prize, Result, 2018 - 2019 Flipkart Lucky Draw Winner


Configure PostgreSQL and phpPgAdmin in WAMP

Flash FLV player using PHP

Flash Live Streaming Player