Skip to content

Commit 27c76f9

Browse files
authored
fix(react-native-reanimated): no-op from 3.4.0 on (#2350)
Manual initialization is no longer necessary as of 3.4.0.
1 parent 99e2c04 commit 27c76f9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

plugins/reanimated.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const {
66
const { getPackageVersion, toVersionNumber, v } = require("../scripts/helpers");
77
const { withReactNativeHost } = require("./index");
88

9-
/** @typedef {import("@expo/config-plugins").ExportedConfig} ExportedConfig */
9+
/** @import { ExportedConfig } from "@expo/config-plugins" */
1010

1111
const NAME = "react-native-reanimated";
1212

@@ -90,6 +90,13 @@ function installerFor(version, indent = " ") {
9090
* @returns {ExportedConfig} Modified config
9191
*/
9292
function withReanimatedExecutor(config) {
93+
// As of 3.4.0, manual initialization is no longer necessary:
94+
// https://github.com/software-mansion/react-native-reanimated/commit/6f19a367f4939cbbc82f3de6668fd896c695a2ac
95+
const reanimated = getPackageVersion("react-native-reanimated");
96+
if (toVersionNumber(reanimated) >= v(3, 4, 0)) {
97+
return config;
98+
}
99+
93100
return withReactNativeHost(config, (config) => {
94101
if (config.modResults.language !== "objcpp") {
95102
throw new Error(

0 commit comments

Comments
 (0)