If you want to spin up a new Expo Go app quickly then this handy article shows you how to do it in 4 easy steps
You can find the old version of this blog article here Creating a Typescript, Tailwind and Expo Go App in 2 minutes (2022 version) - this new version does everything included in the old version in a single command line to get your Expo Go Tailwind app running in no time at all.
Using Expo for building apps is a better experience (in my opinion) than using a bare bones React Native setup. I find the Expo Go App great for getting your self up and running quickly and being able to see something on a device quickly is just awesome. The purpose of this page is to try and get it up and running even quicker.
APP_NAME="my-awesome-app" mkdir $APP_NAME \ && cd $APP_NAME \ && npx create-expo-app . --template blank \ && rm -rf .git \ && sed -i '' "s/\"name\": \"myapp\"/\"name\": \"$APP_NAME\"/" app.json \ && sed -i '' "s/\"name\": \"myapp\"/\"name\": \"$APP_NAME\"/" package.json \ && npx expo install react-dom react-native-web @expo/metro-runtime \ && rm package-lock.json \ && yarn add nativewind \ && yarn add -D tailwindcss@3.3.2 \ && yarn add typescript @types/react @types/react-native \ && yarn add @react-navigation/native @react-navigation/native-stack \ && yarn add react-native-screens react-native-safe-area-context \ && echo '{\n\t"extends": "expo/tsconfig.base",\n\t"compilerOptions": {}\n}' > tsconfig.json \ && npx tailwindcss init \ && sed -i '' "s/content: \[\],/content: \[\".\/App.{js,jsx,ts,tsx}\", \".\/src\/**\/*.{js,jsx,ts,tsx}\"\],/" tailwind.config.js \ && sed -i '' "/presets: \['babel-preset-expo'\],/a\\ plugins: \[\"nativewind\/babel\"\]," babel.config.js \ && sleep 1 \ && mv App.js App.tsx \ && echo '/// <reference types="nativewind/types" />' > my-app.d.ts \ && code . --add \ && cat > App.tsx <<EOL import React from 'react'; import { View, Text } from 'react-native'; import { NavigationContainer } from '@react-navigation/native'; import { createNativeStackNavigator } from '@react-navigation/native-stack'; import { StatusBar } from 'expo-status-bar'; function HomeScreen() { return ( <View className="flex-1 items-center justify-center bg-white"> <View className="bg-cyan-100 py-2 px-7 rounded-lg border border-cyan-300"> <Text className="text-cyan-700 text-lg"> I am a Tailwind Expo Go app! $APP_NAME </Text> </View> <StatusBar style="auto" /> </View> ); } const Stack = createNativeStackNavigator(); function App() { return ( <NavigationContainer> <Stack.Navigator> <Stack.Screen name="home" component={HomeScreen} /> </Stack.Navigator> </NavigationContainer> ); } export default App; EOL # Start expo after the file is written npx expo start
This does the following:
my-app.d.ts
...there you go a good blank starting template for your next Expo Go app. Enjoy