Rewrite React Native App

Danish KhanDanish 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.

  1. Views are similar to div.

  2. Text: It is used to write texts and strings.

  3. SafeAreaView: It is used to avoid the notch. Wrap the entire content in it.

  4. In JSX, a starting tag needs to have an end tag.

  5. 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

Danish Khan
Danish Khan