mirror of
https://github.com/facebook/react.git
synced 2026-11-18 20:15:56 +00:00
Type ReactCurrentOwner (#7648)
Simpler than ReactOwner :)
(cherry picked from commit 2559030c34)
This commit is contained in:
1 parent
2c16a6bb9d
commit
db985af3c3
2 files changed
+5
-1
No files matched your search
@@ -7,10 +7,13 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*
|
||||
* @providesModule ReactCurrentOwner
|
||||
* @flow
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
import type { ReactInstance } from 'ReactInstanceType';
|
||||
|
||||
/**
|
||||
* Keeps track of the current owner.
|
||||
*
|
||||
@@ -23,7 +26,7 @@ var ReactCurrentOwner = {
|
||||
* @internal
|
||||
* @type {ReactComponent}
|
||||
*/
|
||||
current: null,
|
||||
current: (null: null | ReactInstance),
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -34,4 +34,5 @@ export type ReactInstance = {
|
||||
_mountImage: any,
|
||||
// __DEV__
|
||||
_debugID: DebugID,
|
||||
_warnedAboutRefsInRender: bool,
|
||||
};
|
||||
Reference in new issue
Block a user