This is my first blog for React Native Application. In this blog, I will explain about the setup up of React Native Application. I have facing many issues on the setup of React Native, at last, I have success about it. I have followed the facebook react native document for the set.
They provide us with 2 methods for creating the application. first one is Quickstart and second by React-Native. As the first install Node . I have assumed you have installed Node.
-
QuickStart
you can use npm to install the
create-react-native-app
command line utility:1npm install -g create-react-native-appThen run the following commands to create a new React Native project called “Awesome Project”:
1create-react-native-app AwesomeProject cd AwesomeProject npm startThis will start a development server for you.
but I have face issue on Quickstart is cookies management is not working.
- Building Project with Native Code-
Follow Some Installation process.
- Install React Native CLI
1npm install -g react-native-cli
- Install JAVA.
- Install Android Studio.
- Install Android SDK
- Configure ANDROID_HOME in the environment variable.
- Install watchman Guide
- Installing watchman on Ubuntu
123456789101112$ cd ~$ git clone https://github.com/facebook/watchman.git$ cd watchman/$ git checkout v4.7.0$ sudo apt-get install -y autoconf automake build-essential python-dev$ ./autogen.sh$ ./configure$ make$ sudo make install$ watchman --version$ echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_watches && echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_queued_events && echo 999999 | sudo tee -a /proc/sys/fs/inotify/max_user_instances && watchman shutdown-server
Now create first React Native Application.
1 |
react-native init AwesomeProject |
Now Run your first Application on your Device. First of all, we add “local.property” file in the android folder structure of Application that has your SDK path.
then use commands on your terminal.
1 2 |
cd AwesomeProject react-native run-android |
Now you look its run on your device.
Some useful command which we aware
- the command for increasing size of the watchman-
12$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf$ sudo sysctl -p
- fix babel Issue
12npm add @babel/runtimenpm install
- ADB commands
12adb kill-serveradb start-server
All setups and configuration have done. So, we need to modify our App.js file for our Application. I will explain ReactNative Basic Information in my next blog.
References: https://facebook.github.io/react-native/docs/getting-started.html
https://medium.com/@vonchristian/how-to-setup-watchman-on-ubuntu-16-04-53196cc0227c