mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Deprecate ReactPackage.createNativeModules recommending using getModule instead (#39339)
Summary: Pull Request resolved: https://github.com/facebook/react-native/pull/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: b20de9274ed4bd35a239c672b52bfac529a79bc2
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4fd44cdc11
commit
33181ef8af
+4
-1
@@ -11,6 +11,7 @@ import androidx.annotation.NonNull;
|
||||
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;
|
||||
@@ -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} */
|
||||
|
||||
Reference in New Issue
Block a user