dillon1000/react
Commit
Browse files Define `HostInstance` type for React Native (#31101)
## Summary Creates a new `HostInstance` type for React Native, to more accurately capture the intent most developers have when using the `NativeMethods` type or `React.ElementRef<HostComponent<T>>`. Since `React.ElementRef<HostComponent<T>>` is typed as `React.AbstractComponent<T, NativeMethods>`, that means `React.ElementRef<HostComponent<T>>` is equivalent to `NativeMethods` which is equivalent to `HostInstance`. ## How did you test this change? ``` $ yarn $ yarn flow fabric ```
Changed paths1 file
First-parent comparisonpackages/react-native-renderer/src/ReactNativeTypes.js ModifiedPatch
Files changed
Rendering syntax-highlighted changes…