Skip to content

Commit b3b80a4

Browse files
yunchanchogaearon
authored andcommitted
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
1 parent 5e8beec commit b3b80a4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

packages/react-art/src/ReactART.js

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
import React from 'react';
9+
import ReactVersion from 'shared/ReactVersion';
910
import * as ARTRenderer from 'react-reconciler/inline.art';
1011
import Transform from 'art/core/transform';
1112
import Mode from 'art/modes/current';
@@ -131,6 +132,13 @@ class Text extends React.Component {
131132
}
132133
}
133134

135+
ARTRenderer.injectIntoDevTools({
136+
findFiberByHostInstance: () => null,
137+
bundleType: __DEV__ ? 1 : 0,
138+
version: ReactVersion,
139+
rendererPackageName: 'react-art',
140+
});
141+
134142
/** API */
135143

136144
export const ClippingRectangle = TYPES.CLIPPING_RECTANGLE;

0 commit comments

Comments
 (0)