Skip to content

Add support for react-native-reanimated v2.0.0 #228

@FlorBosch

Description

@FlorBosch

This version is different from the current supported version (react-native-reanimated_v1.3.0+). According to the documentation:

Reanimated 2 is primarily built in C++ using Turbo Modules infrastructure which is not yet completely deployed in React Native (specifically on Android). Because of that the installation of new Reanimated requires additional steps apart from just adding a dependency to package.json.

This means that the following method needs to be overridden in the ElectrodeReactNativeHost, something that the current ReactPlugin interface doesn't provide.

      @Override
      protected JSIModulePackage getJSIModulePackage() {
        return new ReanimatedJSIModulePackage(); // <- add
      }

Besides the new JSIModulePackage there is another difference in how the android module is generated for this dependency: during the package creation the android-npm folder is added as the android one (createNPMPackage.sh#L82). As you can see the ReanimatedProxyPackage.java is empty in this case, and this is because the aar packages are generated directly and picked up during the build time.

Screenshot 2021-12-10 at 13 35 35

We haven't found a way to support all these changes needed for react-native-reanimated v2.0.0 in our manifest yet.
Any help is appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions