Write your first Component in the React Native for iOS and Android.
1 min readAug 21, 2021
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
sudo gem install cocoapodsNote: Watchman is a tool by Facebook for watching changes in the filesystem.
It is highly recommended you install it for better performance.
Creating a new application using below command
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.1. Go to Root folder and find index.ios.js and index.android.js file.2. Check which component is used for rendering the component.3. It will render App.js file component.4. Open App.js file.5. Import App.js file in the index.ios.js and index.android.js file.6. Then Run your app using command line.7. Start Application in the iOS simulator using below command.
npx react-native run-ios8. Start Application in the Android emulator using below command.
npx react-native run-android