Skip to content

Commit b3772b7

Browse files
troberts-28claude
andcommitted
🆙 Modernize example-expo to Expo SDK 55 + add cross-midnight hourLimit example
- Bump Expo to 55, React Native to 0.83.6, React to 19.2.0. - Add react-native-worklets, upgrade react-native-audio-api. - Enable React Compiler experiment; drop manual useCallback/useMemo wrappers in App.tsx. - Drop deprecated app.json fields (newArchEnabled, edgeToEdgeEnabled) now defaulted by the SDK. - Remove unused babel.config.js. - Add a test page exercising the new wraparound `hourLimit` ({ min: 20, max: 5 }) with a live readout of the reported hour value. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 6c7b229 commit b3772b7

8 files changed

Lines changed: 1148 additions & 1189 deletions

File tree

‎examples/example-expo/App.tsx‎

Lines changed: 321 additions & 265 deletions
Large diffs are not rendered by default.

‎examples/example-expo/app.json‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"slug": "timer-picker-example",
55
"version": "1.0.0",
66
"icon": "./assets/icon.png",
7-
"newArchEnabled": true,
87
"splash": {
98
"image": "./assets/splash.png",
109
"resizeMode": "contain",
@@ -19,12 +18,14 @@
1918
"foregroundImage": "./assets/adaptive-icon.png",
2019
"backgroundColor": "#ffffff"
2120
},
22-
"edgeToEdgeEnabled": true,
2321
"package": "com.nuumi.timerpickerexample"
2422
},
2523
"web": {
2624
"favicon": "./assets/favicon.png"
2725
},
28-
"plugins": ["expo-asset", "expo-font"]
26+
"plugins": ["expo-asset", "expo-font", "react-native-audio-api"],
27+
"experiments": {
28+
"reactCompiler": true
29+
}
2930
}
3031
}

‎examples/example-expo/babel.config.js‎

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

‎examples/example-expo/components/CustomButton.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type CustomButtonProps = {
88
onPress?: () => void;
99
};
1010

11-
export const CustomButton: React.FC<CustomButtonProps> = ({ label, onPress }) => {
11+
export const CustomButton = ({ label, onPress }: CustomButtonProps) => {
1212
return (
1313
<TouchableOpacity onPress={onPress} style={styles.customButtonContainer}>
1414
<LinearGradient
Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
import baseConfig from "../../eslint.config.mjs";
22
import { defineConfig } from "eslint/config";
33

4-
export default defineConfig(
5-
...baseConfig,
6-
{
7-
languageOptions: {
8-
globals: {
9-
atob: "readonly",
10-
btoa: "readonly",
11-
fetch: "readonly",
12-
},
4+
export default defineConfig(...baseConfig, {
5+
languageOptions: {
6+
globals: {
7+
atob: "readonly",
8+
btoa: "readonly",
9+
fetch: "readonly",
1310
},
14-
}
15-
);
11+
},
12+
});

‎examples/example-expo/metro.config.js‎

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,6 @@ const { getDefaultConfig } = require("expo/metro-config");
44

55
const config = getDefaultConfig(__dirname);
66

7-
config.transformer.getTransformOptions = async () => ({
8-
transform: {
9-
experimentalImportSupport: false,
10-
inlineRequires: false,
11-
},
12-
});
13-
147
const extraNodeModules = {
158
"react-native-timer-picker": path.resolve(__dirname, "../../src"),
169
};
@@ -21,6 +14,6 @@ config.resolver.extraNodeModules = new Proxy(extraNodeModules, {
2114
name in target ? target[name] : path.join(process.cwd(), `node_modules/${name}`),
2215
});
2316

24-
config.watchFolders = [path.resolve(__dirname, "../../src")];
17+
config.watchFolders = [...(config.watchFolders ?? []), path.resolve(__dirname, "../../src")];
2518

2619
module.exports = config;

‎examples/example-expo/package.json‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@
1111
"build:ios": "npx expo run:ios"
1212
},
1313
"dependencies": {
14-
"@expo/vector-icons": "^15.0.3",
14+
"@expo/vector-icons": "^15.1.1",
1515
"@react-native-masked-view/masked-view": "0.3.2",
16-
"expo": "~54.0.33",
17-
"expo-asset": "~12.0.12",
18-
"expo-font": "~14.0.11",
19-
"expo-haptics": "~15.0.8",
20-
"expo-linear-gradient": "~15.0.8",
21-
"react": "19.1.0",
22-
"react-native": "0.81.5",
23-
"react-native-audio-api": "0.9.0"
16+
"expo": "^55.0.19",
17+
"expo-asset": "~55.0.16",
18+
"expo-font": "~55.0.6",
19+
"expo-haptics": "~55.0.14",
20+
"expo-linear-gradient": "~55.0.13",
21+
"react": "19.2.0",
22+
"react-native": "0.83.6",
23+
"react-native-audio-api": "^0.12.1",
24+
"react-native-worklets": "0.7.4"
2425
},
2526
"private": true
2627
}

0 commit comments

Comments
 (0)