temporary compatibility fix
Keyan Zhang committed
Jul 29, 2016 at 16:43 UTC
bba0d992d8f4ecf9cf6677817a1218e7f48a8a77
2 files changed
+18
src/isomorphic/hooks/ReactComponentTreeDevtool.js
new
+14
@@ -0,0 +1,14 @@
1
+/**
2
+ * Copyright 2016-present, Facebook, Inc.
3
+ * All rights reserved.
4
+ *
5
+ * This source code is licensed under the BSD-style license found in the
6
+ * LICENSE file in the root directory of this source tree. An additional grant
7
+ * of patent rights can be found in the PATENTS file in the same directory.
8
+ *
9
+ * @providesModule ReactComponentTreeDevtool
10
+ */
11
+'use strict';
12
+
13
+// TODO remove this proxy when RN/www gets updated
14
+module.exports = require('ReactComponentTreeHook');
src/renderers/shared/ReactDebugTool.js
+4
@@ -325,6 +325,10 @@ var ReactDebugTool = {
325
},
326
};
327
328
+// TODO remove these when RN/www gets updated
329
+ReactDebugTool.addDevtool = ReactDebugTool.addHook;
330
+ReactDebugTool.removeDevtool = ReactDebugTool.removeHook;
331
+
332
ReactDebugTool.addHook(ReactInvalidSetStateWarningHook);
333
ReactDebugTool.addHook(ReactComponentTreeHook);
334
ReactDebugTool.addHook(ReactChildrenMutationWarningHook);