Writing our First App on react-native

Joshua KemougneJoshua Kemougne
2 min read

Writing our first Hello World on React-native. After running our app it's time to open it on our code editor vs code, atom whatever. We get to see a series of files we have a folder for android, ios etc on these two files we practically don't touch anything beacuse these are in-built files with predefined configs. I didn't have any major issue on running my app except for errors as explained on the previous blog. Well it's always advisable to create a 'local.properties' file in the android folder this is to prevent errors as sdk path not found on other devices.There are other files we will explore in further

Our main focus is on the files index.js and App.tsx. In the file index.tsx we are importing our App and running the app using the AppRegistry.registerComponent. The AppRegistry.registerComponent is registering the component 'App' and the method is AppName which is imported above as a json. In the App.tsx we have some components as View, Text, SafeAreaView. The View compnent is just like a container in simple words as a div. The Text as the name suggests, is a component for texts. The SafeAreaView is to render content within the safe area boundaries of a device. The contents are rendered as a jsx code in a function and returned within the function just exactly as you guessed great job ๐Ÿ˜ƒ React. That's a wrap folks our first app on react-native hope you enjoyed this blog please leave your thoughts and possibly more info on what i might have left out ๐Ÿ™ƒโ˜ am not perfect๐Ÿ˜… stay tuned peace out...

#reactnative #hashnode

2
Subscribe to my newsletter

Read articles from Joshua Kemougne directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Joshua Kemougne
Joshua Kemougne