Skip to content

Commit c557a2d

Browse files
committed
chore: update Expo example app
1 parent f95af76 commit c557a2d

39 files changed

+3160
-3459
lines changed

examples/publish-ci/expo/.eslintrc.json

Lines changed: 0 additions & 41 deletions
This file was deleted.

examples/publish-ci/expo/.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ node_modules/
88
.expo/
99
dist/
1010
web-build/
11+
expo-env.d.ts
12+
build/
1113

1214
# Native
1315
*.orig.*
@@ -36,3 +38,9 @@ yarn-error.*
3638

3739
# typescript
3840
*.tsbuildinfo
41+
42+
# IDE
43+
.vscode
44+
45+
.yalc/
46+
yalc.lock
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"arrowParens": "avoid",
3-
"bracketSameLine": true,
4-
"singleQuote": true,
5-
"trailingComma": "all"
3+
"semi": false,
4+
"singleQuote": true
65
}

examples/publish-ci/expo/App.tsx

Lines changed: 10 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,10 @@
1-
import type { FC } from 'react';
2-
import {
3-
SafeAreaView,
4-
ScrollView,
5-
StatusBar,
6-
StyleSheet,
7-
Text,
8-
View,
9-
useColorScheme,
10-
} from 'react-native';
11-
import { Provider } from 'react-redux';
12-
import { store } from './src/app/store';
13-
import { Counter } from './src/features/counter/Counter';
14-
15-
import {
16-
DebugInstructions,
17-
HermesBadge,
18-
LearnMoreLinks,
19-
ReloadInstructions,
20-
} from 'react-native/Libraries/NewAppScreen';
21-
import { Header } from './src/components/Header';
22-
import { LearnReduxLinks } from './src/components/LearnReduxLinks';
23-
import { Section } from './src/components/Section';
24-
import { TypedColors } from './src/constants/TypedColors';
25-
26-
export const App: FC = () => {
27-
const isDarkMode = useColorScheme() === 'dark';
28-
29-
const backgroundStyle = {
30-
backgroundColor: isDarkMode ? TypedColors.darker : TypedColors.lighter,
31-
};
32-
33-
return (
34-
<Provider store={store}>
35-
<SafeAreaView style={backgroundStyle}>
36-
<StatusBar
37-
barStyle={isDarkMode ? 'light-content' : 'dark-content'}
38-
backgroundColor={backgroundStyle.backgroundColor}
39-
/>
40-
<ScrollView
41-
contentInsetAdjustmentBehavior="automatic"
42-
style={backgroundStyle}>
43-
<Header />
44-
<HermesBadge />
45-
<View
46-
style={{
47-
backgroundColor: isDarkMode
48-
? TypedColors.black
49-
: TypedColors.white,
50-
}}>
51-
<Counter />
52-
<Section title="Step One">
53-
Edit <Text style={styles.highlight}>App.tsx</Text> to change this
54-
screen and then come back to see your edits.
55-
</Section>
56-
<Section title="See Your Changes">
57-
<ReloadInstructions />
58-
</Section>
59-
<Section title="Debug">
60-
<DebugInstructions />
61-
</Section>
62-
<Section title="Learn More Redux">
63-
Discover what to do next with Redux:
64-
</Section>
65-
<LearnReduxLinks />
66-
<Section title="Learn More React Native">
67-
Read the docs to discover what to do next:
68-
</Section>
69-
<LearnMoreLinks />
70-
</View>
71-
</ScrollView>
72-
</SafeAreaView>
73-
</Provider>
74-
);
75-
};
76-
77-
const styles = StyleSheet.create({
78-
highlight: {
79-
fontWeight: '700',
80-
},
81-
});
82-
83-
export default App;
1+
import type { JSX } from 'react'
2+
import { Provider } from 'react-redux'
3+
import { store } from './src/app/store'
4+
import { Main } from './src/Main'
5+
6+
export const App = (): JSX.Element => (
7+
<Provider store={store}>
8+
<Main />
9+
</Provider>
10+
)

examples/publish-ci/expo/__tests__/App.test.tsx

Lines changed: 0 additions & 9 deletions
This file was deleted.

examples/publish-ci/expo/__tests__/counterSlice.test.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.

examples/publish-ci/expo/app.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
"orientation": "portrait",
77
"icon": "./assets/icon.png",
88
"userInterfaceStyle": "light",
9+
"newArchEnabled": true,
910
"splash": {
10-
"image": "./assets/splash.png",
11+
"image": "./assets/splash-icon.png",
1112
"resizeMode": "contain",
1213
"backgroundColor": "#ffffff"
1314
},
14-
"assetBundlePatterns": ["**/*"],
1515
"ios": {
1616
"supportsTablet": true
1717
},
17.1 KB
Loading
-46.2 KB
Binary file not shown.
Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
1-
/** @type {import('@babel/core').ConfigFunction} */
2-
module.exports = api => {
3-
api.cache.forever();
1+
/** @import { ConfigFunction } from "@babel/core" */
2+
/** @import { BabelPresetExpoOptions } from "babel-preset-expo" */
3+
4+
/**
5+
* @satisfies {ConfigFunction}
6+
*/
7+
const config = api => {
8+
api.cache.forever()
9+
410
return {
5-
presets: ['babel-preset-expo'],
6-
};
7-
};
11+
presets: [
12+
/**
13+
* @satisfies {['babel-preset-expo', BabelPresetExpoOptions?]}
14+
*/
15+
(['babel-preset-expo']),
16+
],
17+
}
18+
}
19+
20+
module.exports = config

0 commit comments

Comments
 (0)