Skip to content

Commit

Permalink
Deprecate ReactPackage.createNativeModules recommending using getModu…
Browse files Browse the repository at this point in the history
…le instead (#39339)

Summary:
Pull Request resolved: #39339

Deprecating createNativeModules method from ReactPackage interface recommending using getModule instead in the new architecture of React Native

changelog: [Android][Changed] Deprecating createNativeModules method from ReactPackage interface recommending using getModule instead in the new architecture of React Native

Reviewed By: cortinico

Differential Revision: D48992719

fbshipit-source-id: 5a64cb8ee10e10315e72f10b402f377951e3e3d9
  • Loading branch information
mdvacca committed Sep 14, 2023
1 parent 981f3ca commit 3bdc0d2
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import com.facebook.infer.annotation.Nullsafe;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.common.annotations.DeprecatedInNewArchitecture;
import com.facebook.react.uimanager.UIManagerModule;
import com.facebook.react.uimanager.ViewManager;
import java.util.List;
Expand All @@ -37,9 +38,11 @@ public interface ReactPackage {

/**
* @param reactContext react application context that can be used to create modules
* @return list of native modules to register with the newly created catalyst instance
* @return list of native modules to register with the newly created catalyst instance This method
* is deprecated in the new Architecture of React Native.
*/
@NonNull
@DeprecatedInNewArchitecture
List<NativeModule> createNativeModules(@NonNull ReactApplicationContext reactContext);

/** @return a list of view managers that should be registered with {@link UIManagerModule} */
Expand Down

0 comments on commit 3bdc0d2

Please sign in to comment.