Setting up my first app with ReactNative.
So excited to finally write code and see the changes on the emulator. MY FIRST APP.
function App () {
return(
<SafeAreaView>
<View>
<Text>
Bem vindo à minha aplicação.
</Text>
</View>
</SafeAreaView>
}
export default App
The code written in the function App is HTML code inside JavaScript. It is called JSX.
In this code we have different components.
<SafeAreaView> : does work related to indentation.
<View> : Is like the Div of CSS.
<Text> : Allows us to write text.
The last line of the code allows us to export the function App to other files by calling it.
"default" specifically targets the function "App" and allows us to call it on another file without using curly braces.
We should not forget the return () to make our function return something because when we call a function we are calling the return value of that function.