1.Open the Project Folder using IDE (Ex: Visual studio code)
2.In the visual studio code -> The Project folder is displayed as shown in the following figure.
3.Observe the project folder _tests_ ,android, ios , node_modules , app.js are created in this project folder
4.Double click the app.js , will give us option add or edit the existing the app.js
/** * Sample React Native App * */ import React from 'react'; import { StyleSheet, View, Text, StatusBar, } from 'react-native'; const App = () => { return ( <StatusBar barStyle="dark-content"/> <View style={styles.body}> <Text>Hello, world!</Text> </View> ); }; const styles = StyleSheet.create({ body: { flex: 1, justifyContent: "center", alignItems: "center" }, }); export default App;
1.Open the Terminal
run the android application in terminal-> cd "/Users/ramasamy/Desktop/ReactNativeSample" && npx react-native run-android
run the ios application in terminal-> cd "/Users/ramasamy/Desktop/ReactNativeSample" && npx react-native run-ios
cd "/Users/ramasamy/Desktop/ReactNativeSample" && npx react-native run-android
cd "/Users/ramasamy/Desktop/ReactNativeSample" && npx react-native run-ios
Output Result
Once enter the command , after a minute , the result will be displayed simulator / emulator in the following figure
I started to learn android and Kotlin and iOS and Hybrid application and i love more interesting to code and finding new developer minds who are join to me You're welcome to keep on using my website.Instead, you can join our FB page for developer comments and post there: https://www.facebook.com/ramasamy.m.779 Best wishes :) Ramasamy(Software Developer)
See what's new in Android & IOS & Hybrid development … explore and learn in site