React NATIVE Tutorial Part-1


Here, I am starting the ReactNative to build a Mobile Application.
Here in this SS, ( I am explaining line by line )
Line 1: Here I import React from the library of "react".
Line 3: Here I import some components( View
, Text
& SafeAreaView
).
Line 5: Here I call the function "App". Must remember that the first letter of a function name should be in Capital form.
Line 6: Here I am returning the components or elements by using " return()". Must remember, You have to grab all of your codes(which you want to show on the mobile screen) and put them into the return function.
Lines 7 & 11: Here it took the SafeAreaView component. The working principle of it is that it will save your content from any navigation bar.
Lines 8 & 10: Here the View component is used to keep anything to show on the display.
Line 9: By using the Text component, I write the Text " Hello world! ", and show it on the screen.
Line 15: Here I export the function "App" as a default export. By this, the compiler will understand that I want to show this function on the screen.
View : It is a component. It used to grab rest of the components like "Text", "Button". It also can grab lot more "View" component.
Text: It is a component. It used for display any Text.
SafeAreaView: It is a component. It used to make a safe border for all components which available are to despaly.
Subscribe to my newsletter
Read articles from Rejawanul Haque directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
