A simple start with React native
Published in
2 min readFeb 26, 2022
React native is a react but with some special components like react has divs or fragments similarly react native has view or safeareaview.. and we use properties of components as a props of components.
Component name always starting with capital or uppercase…
<View />, <Text />, <Image/>
Below i describe some basic components..
- View : view is a container that supports layout with flexbox, touch and so on .view is same as div..
- Text :every applications have text for display…same as React native has Text components which is use for display text in app..
- Image: with the help of image components we display images on our react native app..
- SafeAreaView: The purpose of SafeAreaView is to render content within the safe area boundaries of a device. It is currently only applicable to iOS based app…. Nowaday, smart phones come with notch….and we use safeareaview for skip that notch.Below, picture shows safearea ..
Example :
import React from ‘react’;Import { Text, View, Image } from ‘react-native’;const ExampleApp = () => {return (<View style={{ flex: 1, justifyContent: “start” }}><Text>Hello, i m example app</Text><Imagestyle={{Height:200, width:300}} source={{ uri:”https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcSZBPpKvVu9mO0XUGMAZNSJbNQ0sK4ucXjrvg&usqp=CAU”}}/></View>) }export default ExampleApp;
For more components visit official documentation..