Rewrite React Native App
Danish Khan
1 min read
All thanks to Hitesh Choudhary Sir for this wonderful content.
In this article, we will start with the basics of react-native.
Views are similar to div.
Text: It is used to write texts and strings.
SafeAreaView: It is used to avoid the notch. Wrap the entire content in it.
In JSX, a starting tag needs to have an end tag.
Without a return statement, nothing will be rendered on the mobile screen.
import React from 'react';
import {
View,
Text,
SafeAreaView,
} from 'react-native';
function app(){
return (
<SafeAreaView>
<View>
<Text>Hello World !</Text>
</View>
</SafeAreaView>
);
}
export default app;
1
Subscribe to my newsletter
Read articles from Danish Khan directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by