-
Notifications
You must be signed in to change notification settings - Fork 24.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Define
HostInstance
type for React Native (#46743)
Summary: Pull Request resolved: #46743 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`. Changelog: [General][Added] - Added `HostInstance` type to represent the instance of a `HostComponent<T>`. Test Plan: Ran the following successfully: ``` $ cd ~/fbsource $ js1 flow ``` Reviewed By: NickGerleman Differential Revision: D63646555 Pulled By: yungsters fbshipit-source-id: 075859e6b0217521ba9ab2b92843ae7e47db5be0
- Loading branch information
1 parent
d4ea147
commit e24f991
Showing
1 changed file
with
13 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters