yarn add react-native-reanimated@next react-native-gesture-handlers
import 'react-native-gesture-handler to App.tsx
update babel.config.json
presets: ["module:metro-react-native-babel-preset"],
plugins: [
"react-native-reanimated/plugin",
],
};
update build.gradle
project.ext.react = [ enableHermes: true ]
update MainApplication.java
import com.facebook.react.bridge.JSIModulePackage;
import com.swmansion.reanimated.ReanimatedJSIModulePackage;
Add in ReactNative Host ()
@Override protected JSIModulePackage getJSIModulePackage() { return new ReanimatedJSIModulePackage(); }
출처
https://github.com/software-mansion/react-native-reanimated/issues/846
https://stackoverflow.com/questions/67130651/reanimated-2-failed-to-create-a-worklet-maybe-you-forgot-to-add-reanimateds-ba