Home > Web Front-end > JS Tutorial > Exploring Three Major core components of React Native

Exploring Three Major core components of React Native

Patricia Arquette
Release: 2024-12-05 05:53:20
Original
611 people have browsed it

Exploring Three Major core components of React Native

There are three important core component which will be used several times inside the JSX component. which are given below,

View

View in react native is so called as a container which holds other core components of react native. It is like wrapper which holds other components.

If you guys come from web development then this View is like

,
, and
tags from html.

In React Native we only have component to make a container.

Text

Text in react native is a core component which helps to write text in it. without you cannot write text in React Native.

In Web Development, if you want to write a text can you just simply write texts inside a

,
or inside
, but inside React Native if you write text inside component you get an error kind of like this,

Exploring Three Major core components of React Native

Exploring Three Major core components of React Native

Here you can see it is giving us an error about the Text strings must be rendered with a component.”**

The Syntax to write a string is given below,

<View>
    <Text>
        Something that we have to render in this text tag, In React Native.
    </Text>
<View>
Copy after login

Real time example to write text,

Exploring Three Major core components of React Native

Now the Last which is TextInput

is a component which helps to write texts inside a box, for web devs it’s like a tag.

to learn more about these core component checkout these links,

Thanks for reading. And, if you're interested in building native apps on React Native, then stay updated on https://dev.to/sadiqhasanrupani

If you want to see what I'm up to, follow me on LinkedIn or X.

The above is the detailed content of Exploring Three Major core components of React Native. For more information, please follow other related articles on the PHP Chinese website!

source:dev.to
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template