Skip to content

Commit

Permalink
Inject react-art renderer into react-devtools (#13173)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
yunchancho authored and gaearon committed Aug 2, 2018
1 parent 5e8beec commit b3b80a4
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/react-art/src/ReactART.js
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit b3b80a4

Please sign in to comment.