react-native-gesture-image-viewer@2.0.0-beta.0
Pre-release
Pre-release
·
7 commits
to main
since this release
Major Changes
-
db35df7: feat: upgraded react-native-reanimated v4
- Upgraded react-native-reanimated to version 4.x.
- Added react-native-worklets as a dependency.
- Enhanced
withSpring
animation responsiveness and behavior. - https://docs.swmansion.com/react-native-reanimated/docs/guides/migration-from-3.x
Reanimated Configure Migration Guide:
npm install react-native-worklets
// babel.config.js module.exports = (api) => { api.cache(true); return getConfig( { presets: ['babel-preset-expo'], plugins: [ // for web '@babel/plugin-proposal-export-namespace-from', // react-native-worklets/plugin has to be listed last. - 'react-native-reanimated/plugin', + 'react-native-worklets/plugin', ], }, { root, pkg }, ); };
// metro.config.js const path = require('path'); const { getDefaultConfig } = require('@expo/metro-config'); const { withMetroConfig } = require('react-native-monorepo-config'); - const { wrapWithReanimatedMetroConfig } = require('react-native-reanimated/metro-config'); const root = path.resolve(__dirname, '..'); /** * Metro configuration * https://facebook.github.io/metro/docs/configuration * * @type {import('metro-config').MetroConfig} */ const config = withMetroConfig(getDefaultConfig(__dirname), { root, dirname: __dirname, }); config.resolver.unstable_enablePackageExports = true; - module.exports = wrapWithReanimatedMetroConfig(config); + module.exports = config