arrow_back
Back

React Native components

Andrew Dorokhov Andrew Dorokhov schedule 1 min read
menu_book Table of Contents
import { View, Text } from "react-native";

View and Text are native components:

<View>
    <Text>Hello, world!</Text>
</View>

View is something like a div in HTML.

Expo Router

Expo Router is a routing library for React Native that allows you to navigate between screens in your app. There are two types of routes:

  • Stack routes
  • Tab routes

Stack routes:

<Stack>
    <Stack.Screen name="index" options={{ title: "Home" }} />
    <Stack.Screen name="about" options={{ title: "About" }} />
</Stack>

Tab routes:

<Tabs>
    <Tabs.Screen name="index" options={{ title: "Home" }} />
    <Tabs.Screen name="about" options={{ title: "About" }} />
</Tabs>

Where index and about are the filenames of the screens.

code

Need Help with Development?

Happy to help — reach out via the contacts or go straight to my Upwork profile.

work View Upwork Profile arrow_forward