Skip to content

Commit

Permalink
chore: updated expo 52 and other dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gorhom committed Nov 17, 2024
1 parent e898859 commit e7abc77
Show file tree
Hide file tree
Showing 6 changed files with 1,682 additions and 748 deletions.
1 change: 1 addition & 0 deletions example/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"icon": "./assets/icon.png",
"userInterfaceStyle": "automatic",
"backgroundColor": "#000000",
"newArchEnabled": true,
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
Expand Down
7 changes: 5 additions & 2 deletions example/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
// Learn more https://docs.expo.io/guides/customizing-metro
const { getDefaultConfig } = require('expo/metro-config');
const path = require('path');
const path = require('node:path');
const {
wrapWithReanimatedMetroConfig,
} = require('react-native-reanimated/metro-config');

// Find the project and workspace directories
const projectRoot = __dirname;
Expand All @@ -15,4 +18,4 @@ config.resolver.nodeModulesPaths = [path.resolve(projectRoot, 'node_modules')];

config.resolver.disableHierarchicalLookup = true;

module.exports = config;
module.exports = wrapWithReanimatedMetroConfig(config);
38 changes: 19 additions & 19 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,34 @@
"@react-navigation/native": "^6.1.9",
"@react-navigation/native-stack": "^6.9.17",
"@react-navigation/stack": "^6.3.20",
"@shopify/flash-list": "1.6.4",
"expo": "~51.0.21",
"expo-asset": "~10.0.10",
"expo-blur": "~13.0.2",
"expo-image": "~1.13.0",
"expo-status-bar": "~1.12.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"react-native": "0.74.3",
"react-native-gesture-handler": "~2.16.1",
"react-native-maps": "1.14.0",
"react-native-pager-view": "6.3.0",
"react-native-reanimated": "~3.10.1",
"@shopify/flash-list": "1.7.1",
"expo": "^52.0.7",
"expo-asset": "~11.0.1",
"expo-blur": "~14.0.1",
"expo-image": "~2.0.0",
"expo-status-bar": "~2.0.0",
"react": "18.3.1",
"react-dom": "18.3.1",
"react-native": "0.76.2",
"react-native-gesture-handler": "~2.20.2",
"react-native-maps": "1.18.0",
"react-native-pager-view": "6.4.1",
"react-native-reanimated": "~3.16.1",
"react-native-redash": "^18.1.0",
"react-native-safe-area-context": "4.10.5",
"react-native-screens": "3.31.1",
"react-native-safe-area-context": "4.12.0",
"react-native-screens": "~4.1.0",
"react-native-tab-view": "^3.5.2",
"react-native-web": "~0.19.10"
"react-native-web": "~0.19.13"
},
"devDependencies": {
"@babel/core": "^7.24.0",
"@babel/core": "^7.25.2",
"@babel/plugin-proposal-export-namespace-from": "^7.18.9",
"@types/faker": "^4.1.12",
"@types/react": "~18.2.79",
"@types/react": "~18.3.12",
"@types/react-native": "^0.73.0",
"babel-plugin-module-resolver": "^5.0.0",
"faker": "^4.1.0",
"typescript": "^5.3.0"
"typescript": "^5.3.3"
},
"private": true
}
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@
"@commitlint/config-conventional": "^17.6.5",
"@release-it/conventional-changelog": "^8.0.1",
"@types/invariant": "^2.2.34",
"@types/react": "18.2.45",
"@types/react-native": "0.73.0",
"@types/react": "~18.3.12",
"@types/react-native": "~0.73.0",
"copyfiles": "^2.4.1",
"husky": "^4.3.8",
"lint-staged": "^13.2.2",
"metro-react-native-babel-preset": "^0.77.0",
"react": "18.2.0",
"react-native": "0.73.4",
"react-native-builder-bob": "^0.23.2",
"react-native-gesture-handler": "^2.16.1",
"react-native-reanimated": "^3.10.1",
"react": "18.3.1",
"react-native": "0.76.0",
"react-native-builder-bob": "^0.30.3",
"react-native-gesture-handler": "~2.20.2",
"react-native-reanimated": "~3.16.1",
"release-it": "^17.6.0",
"typescript": "^5.3.0"
},
Expand All @@ -65,7 +65,7 @@
"react": "*",
"react-native": "*",
"react-native-gesture-handler": ">=2.16.1",
"react-native-reanimated": ">=3.10.1"
"react-native-reanimated": ">=3.16.0"
},
"peerDependenciesMeta": {
"@types/react-native": {
Expand Down
7 changes: 6 additions & 1 deletion src/hooks/useStableCallback.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useCallback, useRef } from 'react';
import { useCallback, useEffect, useRef } from 'react';

// biome-ignore lint: to be addressed!
type Callback = (...args: any[]) => any;
Expand All @@ -14,5 +14,10 @@ export const useStableCallback = (callback: Callback) => {
(...args: any) => callbackRef.current && callbackRef.current(...args),
[]
);
useEffect(() => {
return () => {
callbackRef.current = undefined;
};
});
return memoCallback;
};
Loading

0 comments on commit e7abc77

Please sign in to comment.