Step-1
npx create-expo-app@latest
Need to install the following packages:
create-expo-app@3.2.0
Ok to proceed? (y) y
Creating an Expo project using the default template.
To choose from all available templates pass in the –template arg:
$ npx create-expo-app –template
To choose from all available examples pass in the –example arg:
$ npx create-expo-app –example
? What is your app named? » my-app
Step-2
– cd my-app
– npx expo start
Step-3
npm run reset-project
Step-4
File: index.tsx
Code:
import { Text, View } from “react-native”;
const Index = () => {
return (
<View
style={{
backgroundColor: “red”,
flex: 1,
justifyContent: “center”,
alignItems: “center”,
}}
>
<Text style={{fontSize: 30, fontWeight: 700, color: “white”}}>
Welcome to React Native
</Text>
</View>
);
};
export default Index;