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
This commit is contained in:
Yunchan Cho
2018-08-02 20:04:31 +09:00
committed by Dan Abramov
parent 5e8beec84b
commit b3b80a4835

View File

@@ -6,6 +6,7 @@
*/
import React from 'react';
import ReactVersion from 'shared/ReactVersion';
import * as ARTRenderer from 'react-reconciler/inline.art';
import Transform from 'art/core/transform';
import Mode from 'art/modes/current';
@@ -131,6 +132,13 @@ class Text extends React.Component {
}
}
ARTRenderer.injectIntoDevTools({
findFiberByHostInstance: () => null,
bundleType: __DEV__ ? 1 : 0,
version: ReactVersion,
rendererPackageName: 'react-art',
});
/** API */
export const ClippingRectangle = TYPES.CLIPPING_RECTANGLE;