Skip to content

Commit 964183a

Browse files
committed
chore: expo-eample
1 parent 2572112 commit 964183a

44 files changed

Lines changed: 5780 additions & 136 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,8 @@ android/keystores/debug.keystore
7171

7272
# Expo
7373
.expo/
74+
expo-example/ios
75+
expo-example/android
7476

7577
# Turborepo
7678
.turbo/

expo-example/.gitignore

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Learn more https://docs.github.com/en/get-started/getting-started-with-git/ignoring-files
2+
3+
# dependencies
4+
node_modules/
5+
6+
# Expo
7+
.expo/
8+
dist/
9+
web-build/
10+
expo-env.d.ts
11+
12+
# Native
13+
.kotlin/
14+
*.orig.*
15+
*.jks
16+
*.p8
17+
*.p12
18+
*.key
19+
*.mobileprovision
20+
21+
# Metro
22+
.metro-health-check*
23+
24+
# debug
25+
npm-debug.*
26+
yarn-debug.*
27+
yarn-error.*
28+
29+
# macOS
30+
.DS_Store
31+
*.pem
32+
33+
# local env files
34+
.env*.local
35+
36+
# typescript
37+
*.tsbuildinfo
38+
39+
app-example
40+
41+
# generated native folders
42+
/ios
43+
/android

expo-example/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Welcome to your Expo app 👋
2+
3+
This is an [Expo](https://expo.dev) project created with [`create-expo-app`](https://www.npmjs.com/package/create-expo-app).
4+
5+
## Get started
6+
7+
1. Install dependencies
8+
9+
```bash
10+
npm install
11+
```
12+
13+
2. Start the app
14+
15+
```bash
16+
npx expo start
17+
```
18+
19+
In the output, you'll find options to open the app in a
20+
21+
- [development build](https://docs.expo.dev/develop/development-builds/introduction/)
22+
- [Android emulator](https://docs.expo.dev/workflow/android-studio-emulator/)
23+
- [iOS simulator](https://docs.expo.dev/workflow/ios-simulator/)
24+
- [Expo Go](https://expo.dev/go), a limited sandbox for trying out app development with Expo
25+
26+
You can start developing by editing the files inside the **app** directory. This project uses [file-based routing](https://docs.expo.dev/router/introduction).
27+
28+
## Get a fresh project
29+
30+
When you're ready, run:
31+
32+
```bash
33+
npm run reset-project
34+
```
35+
36+
This command will move the starter code to the **app-example** directory and create a blank **app** directory where you can start developing.
37+
38+
## Learn more
39+
40+
To learn more about developing your project with Expo, look at the following resources:
41+
42+
- [Expo documentation](https://docs.expo.dev/): Learn fundamentals, or go into advanced topics with our [guides](https://docs.expo.dev/guides).
43+
- [Learn Expo tutorial](https://docs.expo.dev/tutorial/introduction/): Follow a step-by-step tutorial where you'll create a project that runs on Android, iOS, and the web.
44+
45+
## Join the community
46+
47+
Join our community of developers creating universal apps.
48+
49+
- [Expo on GitHub](https://github.com/expo/expo): View our open source platform and contribute.
50+
- [Discord community](https://chat.expo.dev): Chat with Expo users and ask questions.

expo-example/app.json

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{
2+
"expo": {
3+
"name": "expo-example",
4+
"slug": "expo-example",
5+
"version": "1.0.0",
6+
"orientation": "portrait",
7+
"icon": "./assets/images/icon.png",
8+
"scheme": "expoexample",
9+
"userInterfaceStyle": "automatic",
10+
"newArchEnabled": true,
11+
"ios": {
12+
"supportsTablet": true,
13+
"bundleIdentifier": "com.mfazekas.expo-example"
14+
},
15+
"android": {
16+
"adaptiveIcon": {
17+
"backgroundColor": "#E6F4FE",
18+
"foregroundImage": "./assets/images/android-icon-foreground.png",
19+
"backgroundImage": "./assets/images/android-icon-background.png",
20+
"monochromeImage": "./assets/images/android-icon-monochrome.png"
21+
},
22+
"edgeToEdgeEnabled": true,
23+
"predictiveBackGestureEnabled": false
24+
},
25+
"web": {
26+
"output": "static",
27+
"favicon": "./assets/images/favicon.png"
28+
},
29+
"plugins": [
30+
"expo-router",
31+
[
32+
"expo-splash-screen",
33+
{
34+
"image": "./assets/images/splash-icon.png",
35+
"imageWidth": 200,
36+
"resizeMode": "contain",
37+
"backgroundColor": "#ffffff",
38+
"dark": {
39+
"backgroundColor": "#000000"
40+
}
41+
}
42+
]
43+
],
44+
"experiments": {
45+
"typedRoutes": true,
46+
"reactCompiler": true
47+
}
48+
}
49+
}
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
import { Tabs } from 'expo-router';
2+
import React from 'react';
3+
4+
import { HapticTab } from '@/components/haptic-tab';
5+
import { IconSymbol } from '@/components/ui/icon-symbol';
6+
import { Colors } from '@/constants/theme';
7+
import { useColorScheme } from '@/hooks/use-color-scheme';
8+
9+
export default function TabLayout() {
10+
const colorScheme = useColorScheme();
11+
12+
return (
13+
<Tabs
14+
screenOptions={{
15+
tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
16+
headerShown: false,
17+
tabBarButton: HapticTab,
18+
}}>
19+
<Tabs.Screen
20+
name="index"
21+
options={{
22+
title: 'Home',
23+
tabBarIcon: ({ color }) => <IconSymbol size={28} name="house.fill" color={color} />,
24+
}}
25+
/>
26+
<Tabs.Screen
27+
name="rive"
28+
options={{
29+
title: 'Rive',
30+
tabBarIcon: ({ color }) => <IconSymbol size={28} name="play.circle.fill" color={color} />,
31+
}}
32+
/>
33+
<Tabs.Screen
34+
name="data-binding"
35+
options={{
36+
title: 'Binding',
37+
tabBarIcon: ({ color }) => <IconSymbol size={28} name="link.circle.fill" color={color} />,
38+
}}
39+
/>
40+
<Tabs.Screen
41+
name="explore"
42+
options={{
43+
title: 'Explore',
44+
tabBarIcon: ({ color }) => <IconSymbol size={28} name="paperplane.fill" color={color} />,
45+
}}
46+
/>
47+
</Tabs>
48+
);
49+
}

expo-example/app/_layout.tsx

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import {
2+
DarkTheme,
3+
DefaultTheme,
4+
ThemeProvider,
5+
} from '@react-navigation/native';
6+
import { Stack } from 'expo-router';
7+
import { StatusBar } from 'expo-status-bar';
8+
import 'react-native-reanimated';
9+
10+
import { useColorScheme } from '@/hooks/use-color-scheme';
11+
12+
export default function RootLayout() {
13+
const colorScheme = useColorScheme();
14+
15+
return (
16+
<ThemeProvider value={colorScheme === 'dark' ? DarkTheme : DefaultTheme}>
17+
<Stack>
18+
<Stack.Screen name="index" options={{ headerShown: false }} />
19+
<Stack.Screen
20+
name="simple-rive"
21+
options={{
22+
title: 'Simple Rive Animation',
23+
headerShown: true,
24+
}}
25+
/>
26+
<Stack.Screen
27+
name="data-binding"
28+
options={{
29+
title: 'Data Binding',
30+
headerShown: true,
31+
}}
32+
/>
33+
<Stack.Screen
34+
name="modal"
35+
options={{ presentation: 'modal', title: 'Modal' }}
36+
/>
37+
</Stack>
38+
<StatusBar style="auto" />
39+
</ThemeProvider>
40+
);
41+
}

0 commit comments

Comments
 (0)