Write your first Component in the React Native for iOS
You will need Node, Watchman, the React Native command line interface, Xcode and CocoaPods
How to install Node and Watchman
> brew install node
> brew install watchman
Note: Watchman is a tool by Facebook for watching changes in the filesystem.
It is highly recommended you install it for better performance.
Do setup of React Native using Command Line
> npx react-native init ProjectName
Follow below steps to start the project with your first component:
Once setup is done, It will generate all the files related iOS and android.
> Go to Root folder and find index.ios.js and index.android.js file.
> Check which component is using for render the component.
It will rendering App.js file component.
> Open App.js file.
> Import App.js file in the index.ios.js and index.android.js file.
> Then Run your app using command line.
> Start Application in the iOS simulator using below command.
> npx react-native run-ios
> Start Application in the Android emulator using below command.
> npx react-native run-android