Skip to content

Repository files navigation

Welcome to your Expo app 👋

This is an Expo project created with create-expo-app.

Get started

  1. Install dependencies

    npm install
  2. Start the app

    npx expo start

In the output, you'll find options to open the app in a

You can start developing by editing the files inside the app directory. This project uses file-based routing.

Get a fresh project

When you're ready, run:

npm run reset-project

This command will move the starter code to the app-example directory and create a blank app directory where you can start developing.

Other setup steps

Learn more

To learn more about developing your project with Expo, look at the following resources:

Notes: Nativewind className support

  • className works out of the box on React Native core components (e.g., View, Text, Pressable, FlatList, TouchableOpacity).
  • Some third-party components do not accept className directly (e.g., SafeAreaView from react-native-safe-area-context, icon components).
  • If a component does not support className, either:
    • Wrap it with styled() from nativewind and keep using className, or
    • Use the style prop directly for that component.

Example: wrapping third-party components with styled()

import { Ionicons } from "@expo/vector-icons";
import { SafeAreaView } from "react-native-safe-area-context";
import { styled } from "nativewind";

const StyledSafeAreaView = styled(SafeAreaView);
const StyledIonicons = styled(Ionicons);

export function Screen() {
  return (
    <StyledSafeAreaView className="flex-1 bg-white" edges={["top"]}>
      <StyledIonicons name="grid" size={20} className="text-gray-900" />
    </StyledSafeAreaView>
  );
}

Example: using style when you do not want to wrap

import { SafeAreaView } from "react-native-safe-area-context";

export function Screen() {
  return (
    <SafeAreaView style={{ flex: 1, backgroundColor: "#ffffff" }}>{/* content */}</SafeAreaView>
  );
}

Join the community

Join our community of developers creating universal apps.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages