mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Type ReactCurrentOwner (#7648)
Simpler than ReactOwner :)
(cherry picked from commit 2559030c34)
This commit is contained in:
committed by
Paul O’Shannessy
parent
2c16a6bb9d
commit
db985af3c3
@@ -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