Skip to content
This repository was archived by the owner on Nov 27, 2022. It is now read-only.

Commit ee11e2a

Browse files
committed
chore: upgrade dependencies
1 parent dad1e49 commit ee11e2a

File tree

8 files changed

+2611
-3161
lines changed

8 files changed

+2611
-3161
lines changed

example/package.json

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,25 +10,25 @@
1010
"web": "expo start:web"
1111
},
1212
"dependencies": {
13-
"@expo/vector-icons": "^12.0.4",
14-
"@react-native-async-storage/async-storage": "^1.15.1",
15-
"expo": "^41.0.0-beta.2",
16-
"expo-asset": "~8.3.1",
17-
"expo-constants": "~10.1.1",
18-
"expo-keep-awake": "~9.1.1",
13+
"@expo/vector-icons": "^12.0.0",
14+
"@react-native-async-storage/async-storage": "~1.15.0",
15+
"expo": "^42.0.0",
16+
"expo-asset": "~8.3.3",
17+
"expo-constants": "~11.0.1",
18+
"expo-keep-awake": "~9.2.0",
1919
"react": "16.13.1",
2020
"react-dom": "16.13.1",
21-
"react-native": "https://github.com/expo/react-native/archive/sdk-41.0.0.tar.gz",
21+
"react-native": "https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz",
2222
"react-native-pager-view": "^5.0.12",
2323
"react-native-safe-area-context": "3.2.0",
24-
"react-native-web": "~0.15.5"
24+
"react-native-web": "~0.17.1"
2525
},
2626
"devDependencies": {
27-
"@types/react": "~16.9.35",
28-
"@types/react-native": "~0.63.2",
27+
"@types/react": "~17.0.15",
28+
"@types/react-native": "~0.64.12",
2929
"babel-plugin-module-resolver": "^4.0.0",
30-
"babel-preset-expo": "8.3.0",
31-
"expo-cli": "^4.3.4",
32-
"typescript": "~4.2.3"
30+
"babel-preset-expo": "^8.4.1",
31+
"expo-cli": "^4.9.0",
32+
"typescript": "^4.3.5"
3333
}
3434
}

example/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ type ExampleComponentType = React.ComponentType<{}> & {
3636
appbarElevation?: number;
3737
};
3838

39-
I18nManager.forceRTL(true);
39+
I18nManager.forceRTL(false);
4040

4141
const PERSISTENCE_KEY = 'index_persistence';
4242

example/src/CustomIndicatorExample.tsx

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -56,17 +56,7 @@ export default class CustomIndicatorExample extends React.Component<{}, State> {
5656
) => {
5757
const { position, navigationState, getTabWidth } = props;
5858
const inputRange = [
59-
0,
60-
0.48,
61-
0.49,
62-
0.51,
63-
0.52,
64-
1,
65-
1.48,
66-
1.49,
67-
1.51,
68-
1.52,
69-
2,
59+
0, 0.48, 0.49, 0.51, 0.52, 1, 1.48, 1.49, 1.51, 1.52, 2,
7060
];
7161

7262
const scale = position.interpolate({

example/src/CustomTabBarExample.tsx

Lines changed: 41 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -49,47 +49,49 @@ export default class CustomTabBarExample extends React.Component<{}, State> {
4949
index,
5050
});
5151

52-
private renderItem = ({
53-
navigationState,
54-
position,
55-
}: {
56-
navigationState: State;
57-
position: Animated.AnimatedInterpolation;
58-
}) => ({ route, index }: { route: Route; index: number }) => {
59-
const inputRange = navigationState.routes.map((_, i) => i);
52+
private renderItem =
53+
({
54+
navigationState,
55+
position,
56+
}: {
57+
navigationState: State;
58+
position: Animated.AnimatedInterpolation;
59+
}) =>
60+
({ route, index }: { route: Route; index: number }) => {
61+
const inputRange = navigationState.routes.map((_, i) => i);
6062

61-
const activeOpacity = position.interpolate({
62-
inputRange,
63-
outputRange: inputRange.map((i: number) => (i === index ? 1 : 0)),
64-
});
65-
const inactiveOpacity = position.interpolate({
66-
inputRange,
67-
outputRange: inputRange.map((i: number) => (i === index ? 0 : 1)),
68-
});
63+
const activeOpacity = position.interpolate({
64+
inputRange,
65+
outputRange: inputRange.map((i: number) => (i === index ? 1 : 0)),
66+
});
67+
const inactiveOpacity = position.interpolate({
68+
inputRange,
69+
outputRange: inputRange.map((i: number) => (i === index ? 0 : 1)),
70+
});
6971

70-
return (
71-
<View style={styles.tab}>
72-
<Animated.View style={[styles.item, { opacity: inactiveOpacity }]}>
73-
<Ionicons
74-
name={route.icon}
75-
size={26}
76-
style={[styles.icon, styles.inactive]}
77-
/>
78-
<Text style={[styles.label, styles.inactive]}>{route.title}</Text>
79-
</Animated.View>
80-
<Animated.View
81-
style={[styles.item, styles.activeItem, { opacity: activeOpacity }]}
82-
>
83-
<Ionicons
84-
name={route.icon}
85-
size={26}
86-
style={[styles.icon, styles.active]}
87-
/>
88-
<Text style={[styles.label, styles.active]}>{route.title}</Text>
89-
</Animated.View>
90-
</View>
91-
);
92-
};
72+
return (
73+
<View style={styles.tab}>
74+
<Animated.View style={[styles.item, { opacity: inactiveOpacity }]}>
75+
<Ionicons
76+
name={route.icon}
77+
size={26}
78+
style={[styles.icon, styles.inactive]}
79+
/>
80+
<Text style={[styles.label, styles.inactive]}>{route.title}</Text>
81+
</Animated.View>
82+
<Animated.View
83+
style={[styles.item, styles.activeItem, { opacity: activeOpacity }]}
84+
>
85+
<Ionicons
86+
name={route.icon}
87+
size={26}
88+
style={[styles.icon, styles.active]}
89+
/>
90+
<Text style={[styles.label, styles.active]}>{route.title}</Text>
91+
</Animated.View>
92+
</View>
93+
);
94+
};
9395

9496
private renderTabBar = (
9597
props: SceneRendererProps & { navigationState: State }

0 commit comments

Comments
 (0)