Core Components
Glissez pour afficher le menu
In React Native, everything you see on the screen is built using components.
The two most basic components are:
View: used as a container;Text: used to display any text.
You cannot place text directly inside a View. All text must be wrapped inside a Text component.
Example:
import { View, Text } from 'react-native';
export default function App() {
return (
<View>
<Text>Hello, world</Text>
<Text>This is my first mobile screen</Text>
</View>
);
}
Here, View acts like a wrapper, and Text displays content on the screen.
This is the foundation of every layout in React Native.
Merci pour vos commentaires !
Demandez à l'IA
Demandez à l'IA
Posez n'importe quelle question ou essayez l'une des questions suggérées pour commencer notre discussion
Core Components
In React Native, everything you see on the screen is built using components.
The two most basic components are:
View: used as a container;Text: used to display any text.
You cannot place text directly inside a View. All text must be wrapped inside a Text component.
Example:
import { View, Text } from 'react-native';
export default function App() {
return (
<View>
<Text>Hello, world</Text>
<Text>This is my first mobile screen</Text>
</View>
);
}
Here, View acts like a wrapper, and Text displays content on the screen.
This is the foundation of every layout in React Native.
Merci pour vos commentaires !