@samitouri / QOS-React-2 / commits / b3b80a4835

Inject react-art renderer into react-devtools (#13173)

* Inject react-art renderer into react-devtools This commit makes react-art renderer to be injected to react-devtools, so that component tree of the renderer is presented on debug panel of browser. * Update ReactART.js

Yunchan Cho committed Aug 2, 2018 at 20:04 UTC b3b80a48355ca6dbb61e09f2ef4975be0b973fa4
1 file changed +8
packages/react-art/src/ReactART.js
+8
@@ -6,6 +6,7 @@
6 */
7
8 import React from 'react';
9 +import ReactVersion from 'shared/ReactVersion';
10 import * as ARTRenderer from 'react-reconciler/inline.art';
11 import Transform from 'art/core/transform';
12 import Mode from 'art/modes/current';
@@ -131,6 +132,13 @@ class Text extends React.Component {
132 }
133 }
134
135 +ARTRenderer.injectIntoDevTools({
136 + findFiberByHostInstance: () => null,
137 + bundleType: __DEV__ ? 1 : 0,
138 + version: ReactVersion,
139 + rendererPackageName: 'react-art',
140 +});
141 +
142 /** API */
143
144 export const ClippingRectangle = TYPES.CLIPPING_RECTANGLE;