From bba0d992d8f4ecf9cf6677817a1218e7f48a8a77 Mon Sep 17 00:00:00 2001 From: Keyan Zhang Date: Fri, 29 Jul 2016 16:43:52 -0700 Subject: [PATCH] temporary compatibility fix --- src/isomorphic/hooks/ReactComponentTreeDevtool.js | 14 ++++++++++++++ src/renderers/shared/ReactDebugTool.js | 4 ++++ 2 files changed, 18 insertions(+) create mode 100644 src/isomorphic/hooks/ReactComponentTreeDevtool.js diff --git a/src/isomorphic/hooks/ReactComponentTreeDevtool.js b/src/isomorphic/hooks/ReactComponentTreeDevtool.js new file mode 100644 index 0000000000..8e9898e3c1 --- /dev/null +++ b/src/isomorphic/hooks/ReactComponentTreeDevtool.js @@ -0,0 +1,14 @@ +/** + * Copyright 2016-present, Facebook, Inc. + * All rights reserved. + * + * This source code is licensed under the BSD-style license found in the + * LICENSE file in the root directory of this source tree. An additional grant + * of patent rights can be found in the PATENTS file in the same directory. + * + * @providesModule ReactComponentTreeDevtool + */ +'use strict'; + +// TODO remove this proxy when RN/www gets updated +module.exports = require('ReactComponentTreeHook'); diff --git a/src/renderers/shared/ReactDebugTool.js b/src/renderers/shared/ReactDebugTool.js index 20a27651c6..4882f47a20 100644 --- a/src/renderers/shared/ReactDebugTool.js +++ b/src/renderers/shared/ReactDebugTool.js @@ -325,6 +325,10 @@ var ReactDebugTool = { }, }; +// TODO remove these when RN/www gets updated +ReactDebugTool.addDevtool = ReactDebugTool.addHook; +ReactDebugTool.removeDevtool = ReactDebugTool.removeHook; + ReactDebugTool.addHook(ReactInvalidSetStateWarningHook); ReactDebugTool.addHook(ReactComponentTreeHook); ReactDebugTool.addHook(ReactChildrenMutationWarningHook);