Skip to content

Commit

Permalink
chore: move expo app to new expo architecture
Browse files Browse the repository at this point in the history
  • Loading branch information
gutentag2012 committed Nov 25, 2024
1 parent 698b20f commit 68d7708
Show file tree
Hide file tree
Showing 22 changed files with 7,988 additions and 5,906 deletions.
3 changes: 3 additions & 0 deletions examples/react-native/native-form-signals/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ node_modules/
.expo/
dist/
web-build/
expo-env.d.ts

# Native
*.orig.*
Expand All @@ -33,3 +34,5 @@ yarn-error.*

# typescript
*.tsbuildinfo

app-example
29 changes: 0 additions & 29 deletions examples/react-native/native-form-signals/App.tsx

This file was deleted.

36 changes: 25 additions & 11 deletions examples/react-native/native-form-signals/app.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,41 @@
{
"expo": {
"name": "native-form-signals",
"slug": "native-form-signals",
"name": "simple-form-signals",
"slug": "simple-form-signals",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"icon": "./assets/images/icon.png",
"scheme": "myapp",
"userInterfaceStyle": "automatic",
"newArchEnabled": true,
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
}
},
"web": {
"favicon": "./assets/favicon.png"
"bundler": "metro",
"output": "static",
"favicon": "./assets/images/favicon.png"
},
"plugins": [
"expo-router",
[
"expo-splash-screen",
{
"image": "./assets/images/splash-icon.png",
"imageWidth": 200,
"resizeMode": "contain",
"backgroundColor": "#ffffff"
}
]
],
"experiments": {
"typedRoutes": true
}
}
}
5 changes: 5 additions & 0 deletions examples/react-native/native-form-signals/app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Stack } from "expo-router";

export default function RootLayout() {
return <Stack />;
}
16 changes: 16 additions & 0 deletions examples/react-native/native-form-signals/app/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Text, View } from "react-native";
import {UserForm} from "@/components/UserForm";

export default function Index() {
return (
<View
style={{
flex: 1,
paddingHorizontal: 16,
paddingVertical: 16,
}}
>
<UserForm />
</View>
);
}
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
8 changes: 4 additions & 4 deletions examples/react-native/native-form-signals/babel.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module.exports = (api) => {
api.cache(true)
module.exports = api => {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: [
Expand All @@ -10,5 +10,5 @@ module.exports = (api) => {
},
],
],
}
}
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ export function UserForm() {
<FormInput secureTextEntry />
</form.FieldProvider>

<Button title="Submit" onPress={() => form.handleSubmit()} />
<Button title="Submit" onPress={() => form.handleSubmit()} disabled={!form.canSubmit.value} />
</form.FormProvider>
)
}
Expand Down
Loading

0 comments on commit 68d7708

Please sign in to comment.