Skip to content

Commit a81105a

Browse files
authored
fix: linear gradient animation not working in expo sdk 56 (#11)
* chore: update expo to sdk 56 * refactor: replace depracted absoluteFillObject with absoluteFill * refactor: replace depracated SafeAreaView from react native with react-native-safe-area-context * refactor: update type definition for tab icons * chore: remove obsolete babel configuration file from example directory
1 parent 6e58e62 commit a81105a

8 files changed

Lines changed: 2472 additions & 2360 deletions

File tree

example/app.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
"web": {
2828
"favicon": "./assets/favicon.png"
2929
},
30-
"plugins": ["expo-router"]
30+
"plugins": [
31+
"expo-router",
32+
"expo-status-bar"
33+
]
3134
}
3235
}

example/babel.config.js

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

example/package.json

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,26 @@
99
"web": "expo start --web"
1010
},
1111
"dependencies": {
12-
"@expo/metro-runtime": "~4.0.1",
13-
"expo": "~52.0.46",
14-
"expo-constants": "~17.0.8",
15-
"expo-linear-gradient": "^14.1.4",
16-
"expo-linking": "~7.0.5",
17-
"expo-router": "~4.0.21",
18-
"expo-status-bar": "~2.0.1",
19-
"react": "18.3.1",
20-
"react-dom": "18.3.1",
21-
"react-native": "0.76.9",
22-
"react-native-reanimated": "~3.16.1",
23-
"react-native-safe-area-context": "4.12.0",
24-
"react-native-screens": "~4.4.0",
25-
"react-native-svg": "^15.12.0",
26-
"react-native-web": "~0.19.13"
12+
"@expo/metro-runtime": "~56.0.12",
13+
"@expo/vector-icons": "^15.0.2",
14+
"expo": "~56.0.4",
15+
"expo-constants": "~56.0.15",
16+
"expo-linear-gradient": "~56.0.4",
17+
"expo-linking": "~56.0.11",
18+
"expo-router": "~56.2.6",
19+
"expo-status-bar": "~56.0.4",
20+
"react": "19.2.3",
21+
"react-dom": "19.2.3",
22+
"react-native": "0.85.3",
23+
"react-native-reanimated": "4.3.1",
24+
"react-native-safe-area-context": "~5.7.0",
25+
"react-native-screens": "4.25.2",
26+
"react-native-svg": "15.15.4",
27+
"react-native-web": "^0.21.2",
28+
"react-native-worklets": "0.8.3"
2729
},
2830
"devDependencies": {
29-
"@babel/core": "^7.20.0",
31+
"@babel/core": "^7.29.0",
3032
"react-native-builder-bob": "^0.40.6"
3133
},
3234
"private": true

example/src/app/(tabs)/_layout.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import FontAwesome from '@expo/vector-icons/FontAwesome';
22
import { Tabs } from 'expo-router';
33
import { useCallback } from 'react';
4+
import type { ColorValue } from 'react-native';
45

56
export default function TabLayout() {
67
const renderBarIcon = useCallback(
78
(name: keyof typeof FontAwesome.glyphMap) => {
8-
return ({ color }: { color: string }) => (
9+
return ({ color }: { color: ColorValue }) => (
910
<FontAwesome size={28} name={name} color={color} />
1011
);
1112
},

example/src/app/(tabs)/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { ShimmerProvider } from 'react-native-fast-shimmer';
2-
import { StyleSheet, SafeAreaView } from 'react-native';
2+
import { StyleSheet } from 'react-native';
3+
import { SafeAreaView } from 'react-native-safe-area-context';
34
import { AvatarShimmers } from '../../components/AvatarShimmers';
45
import { LongShimmers } from '../../components/LongShimmers';
56
import { ShimmerConfigs } from '../../components/ShimmerConfigs';

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@
7777
"eslint-plugin-react-hooks": "^6.0.0-rc.1",
7878
"jest": "^29.7.0",
7979
"prettier": "^3.0.3",
80-
"react": "18.3.1",
81-
"react-native": "0.76.9",
80+
"react": "19.2.3",
81+
"react-native": "0.85.3",
8282
"react-native-builder-bob": "^0.40.6",
83-
"react-native-reanimated": "^3.17.5",
84-
"react-native-svg": "^15.12.0",
83+
"react-native-reanimated": "^4.3.1",
84+
"react-native-svg": "^15.15.4",
8585
"release-it": "^17.10.0",
8686
"typescript": "^5.2.2"
8787
},

src/Shimmer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,5 @@ const styles = StyleSheet.create({
9898
height: '100%',
9999
width: '100%',
100100
},
101-
gradientWrapper: StyleSheet.absoluteFillObject,
101+
gradientWrapper: StyleSheet.absoluteFill,
102102
});

0 commit comments

Comments
 (0)