From a8cd2b5a7fcea18013788308f931fcdd4804bc40 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Wed, 18 Dec 2024 15:53:26 +0100 Subject: [PATCH] feat: Use `BaseReactPackage` instead of `TurboReactPackage` (#2546) ## Description This is required for RN 0.77 apparently. TurboReactPackage is deprecated on new arch. No idea why. I am not sure about backwards compatibility either, sorry. Feel free to close this PR if this isn't backwards compatible. ## Changes ## Test code and steps to reproduce ## Checklist - [ ] Included code example that can be used to test this change - [ ] Updated TS types - [ ] Updated documentation: - [ ] https://github.com/software-mansion/react-native-screens/blob/main/guides/GUIDE_FOR_LIBRARY_AUTHORS.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/native-stack/README.md - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/types.tsx - [ ] https://github.com/software-mansion/react-native-screens/blob/main/src/native-stack/types.tsx - [ ] Ensured that CI passes --- .../src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt b/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt index e0a0f01eb..dbe9e7d6e 100644 --- a/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt +++ b/android/src/main/java/com/swmansion/rnscreens/RNScreensPackage.kt @@ -1,6 +1,6 @@ package com.swmansion.rnscreens -import com.facebook.react.TurboReactPackage +import com.facebook.react.BaseReactPackage import com.facebook.react.bridge.NativeModule import com.facebook.react.bridge.ReactApplicationContext import com.facebook.react.module.annotations.ReactModuleList @@ -14,7 +14,7 @@ import com.swmansion.rnscreens.utils.ScreenDummyLayoutHelper ScreensModule::class, ], ) -class RNScreensPackage : TurboReactPackage() { +class RNScreensPackage : BaseReactPackage() { // We just retain it here. This object helps us tackle jumping content when using native header. // See: https://github.com/software-mansion/react-native-screens/pull/2169 private var screenDummyLayoutHelper: ScreenDummyLayoutHelper? = null