From db985af3c3180fae0c83579199ba749fe5669de1 Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Fri, 2 Sep 2016 16:29:24 -0700 Subject: [PATCH] Type ReactCurrentOwner (#7648) Simpler than ReactOwner :) (cherry picked from commit 2559030c344a0e03e2ca03a231c7220671620170) --- src/isomorphic/classic/element/ReactCurrentOwner.js | 5 ++++- src/renderers/shared/stack/reconciler/ReactInstanceType.js | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/isomorphic/classic/element/ReactCurrentOwner.js b/src/isomorphic/classic/element/ReactCurrentOwner.js index e47505f413..da5786e875 100644 --- a/src/isomorphic/classic/element/ReactCurrentOwner.js +++ b/src/isomorphic/classic/element/ReactCurrentOwner.js @@ -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), }; diff --git a/src/renderers/shared/stack/reconciler/ReactInstanceType.js b/src/renderers/shared/stack/reconciler/ReactInstanceType.js index b27d3371c7..d647f4afc9 100644 --- a/src/renderers/shared/stack/reconciler/ReactInstanceType.js +++ b/src/renderers/shared/stack/reconciler/ReactInstanceType.js @@ -34,4 +34,5 @@ export type ReactInstance = { _mountImage: any, // __DEV__ _debugID: DebugID, + _warnedAboutRefsInRender: bool, };