Skip to content

Commit 0f84bdc

Browse files
committed
upgrade example rn 0.81.5
1 parent 0f030d4 commit 0f84bdc

8 files changed

Lines changed: 1299 additions & 954 deletions

File tree

example/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
FlatList,
66
TouchableOpacity,
77
ColorValue,
8-
SafeAreaView,
98
} from 'react-native';
109
import DropdownAlert, {
1110
DropdownAlertData,
@@ -15,6 +14,7 @@ import DropdownAlert, {
1514
} from 'react-native-dropdownalert';
1615
import NotificationIOS from './NotificationIOS';
1716
import NotificationAndroid from './NotificationAndroid';
17+
import { SafeAreaView } from 'react-native-safe-area-context';
1818

1919
interface ListItem {
2020
name: string;

example/NotificationAndroid.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ import {
33
StyleSheet,
44
Text,
55
View,
6-
SafeAreaView,
76
Image,
87
ImageSourcePropType,
98
TouchableOpacity,
109
LayoutAnimation,
1110
} from 'react-native';
1211
import {expo} from './app.json';
12+
import { SafeAreaView } from 'react-native-safe-area-context';
13+
1314
const reactNativeLogoSrc: ImageSourcePropType = {
1415
uri: 'https://reactnative.dev/docs/assets/favicon.png',
1516
};

example/NotificationIOS.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import {
33
StyleSheet,
44
Text,
55
View,
6-
SafeAreaView,
76
Image,
87
ImageSourcePropType,
98
} from 'react-native';
9+
import { SafeAreaView } from 'react-native-safe-area-context';
1010
import {expo} from './app.json';
1111

1212
type NotificationIOSProps = {

example/README.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,16 @@
22

33
- Built with [Expo](https://expo.dev/).
44
- Uses [yarn](https://yarnpkg.com/) v2 modern edition.
5-
- Refer to [Expo setup guide](https://docs.expo.dev/get-started/set-up-your-environment/) for help running this and local environment.
6-
- Use [Expo Go](https://expo.dev/go) option.
75

86
## Up and running
97

108
### Prerequisites
119

12-
- Have iOS simulator and Android emulator installed.
13-
- Have real mobile device.
10+
- Have setup local environment (e.g. simulator, emulator, etc) via [Expo's Setup Guide](https://docs.expo.dev/get-started/set-up-your-environment/).
1411

1512
### Steps
1613

17-
1. Open terminal.
18-
2. Change to example directory (`cd ~/example`).
19-
3. Run `yarn install` to install dependencies.
20-
4. Run `yarn start` to start the development server.
21-
5. Enter `i` or `a` to run on iOS simulator or Android emulator.
14+
1. Open terminal to example directory (`cd ~/react-native-dropdownalert/example`).
15+
2. Run: `yarn install` to install example project dependencies.
16+
3. Run: `yarn start` to start the expo local development server.
17+
4. Follow on-screen instructions to run the app.

example/Root.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from 'react';
2+
import { SafeAreaProvider } from 'react-native-safe-area-context';
3+
import App from './App';
4+
5+
export default function Root(): React.JSX.Element {
6+
return (
7+
<SafeAreaProvider>
8+
<App />
9+
</SafeAreaProvider>
10+
);
11+
}

example/index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { registerRootComponent } from 'expo';
2-
3-
import App from './App';
2+
import Root from './Root';
43

54
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
65
// It also ensures that whether you load the app in Expo Go or in a native build,
76
// the environment is set up appropriately
8-
registerRootComponent(App);
7+
registerRootComponent(Root);
8+

example/package.json

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,25 @@
77
"start": "expo start",
88
"android": "expo start --android",
99
"ios": "expo start --ios",
10-
"web": "expo start --web"
10+
"web": "expo start --web",
11+
"doctor": "npx expo-doctor",
12+
"fix:dedupe": "yarn dedupe"
1113
},
1214
"dependencies": {
13-
"expo": "~53.0.9",
14-
"react": "19.0.0",
15-
"react-native": "0.79.2",
16-
"react-native-dropdownalert": "5.2.0"
15+
"expo": "~54.0.32",
16+
"react": "19.1.0",
17+
"react-dom": "19.1.0",
18+
"react-native": "0.81.5",
19+
"react-native-dropdownalert": "5.2.0",
20+
"react-native-safe-area-context": "5.6.2",
21+
"react-native-web": "0.21.2"
1722
},
1823
"devDependencies": {
19-
"@babel/core": "^7.25.2",
20-
"@types/react": "~19.0.10",
21-
"typescript": "^5.8.3"
24+
"@types/react": "19.1.10",
25+
"@types/react-dom": "~19.1.7",
26+
"@types/react-native-web": "0.19.2",
27+
"expo-doctor": "1.17.14",
28+
"typescript": "5.9.3"
2229
},
23-
"packageManager": "yarn@4.9.2"
30+
"packageManager": "yarn@4.12.0"
2431
}

0 commit comments

Comments
 (0)