Skip to content

Commit 23e9390

Browse files
huntiefacebook-github-bot
authored andcommitted
Deprecate NativeMethods interface (facebook#57031)
Summary: Also update the already deprecated `NativeMethodsMixin` and `NativeMethodsMixinType` types to point to `HostInstance` as canonical. Changelog: [General][Deprecated] - The `NativeMethods` interface is deprecated. Use `HostInstance` instead. Differential Revision: D107129358
1 parent a0d0a39 commit 23e9390

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

packages/react-native/types/public/ReactNativeTypes.d.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ export type MeasureLayoutOnSuccessCallback = (
4141
* native view. This will generally include most components that you define in your own app.
4242
* For more information, see [Direct Manipulation](https://reactnative.dev/docs/the-new-architecture/direct-manipulation-new-architecture).
4343
* @see https://github.com/facebook/react-native/blob/master/Libraries/Renderer/shims/ReactNativeTypes.js#L87
44+
*
45+
* @deprecated Use HostInstance instead.
4446
*/
4547
export interface NativeMethods {
4648
/**
@@ -112,11 +114,11 @@ export interface NativeMethods {
112114
}
113115

114116
/**
115-
* @deprecated Use NativeMethods instead.
117+
* @deprecated Use HostInstance instead.
116118
*/
117119
export type NativeMethodsMixin = NativeMethods;
118120
/**
119-
* @deprecated Use NativeMethods instead.
121+
* @deprecated Use HostInstance instead.
120122
*/
121123
export type NativeMethodsMixinType = NativeMethods;
122124

0 commit comments

Comments
 (0)