From 541589529357dc9c13312a7cf55ce8d67fcc8ce1 Mon Sep 17 00:00:00 2001 From: Yunchan Cho Date: Sat, 7 Jul 2018 23:20:57 +0900 Subject: [PATCH 1/2] 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. --- packages/react-art/src/ReactART.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/react-art/src/ReactART.js b/packages/react-art/src/ReactART.js index 7ee384707f12e..096fe207edf7e 100644 --- a/packages/react-art/src/ReactART.js +++ b/packages/react-art/src/ReactART.js @@ -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-renderer', +}); + /** API */ export const ClippingRectangle = TYPES.CLIPPING_RECTANGLE; From 78e092b0a24e34531b36e3f3a18533169d20d16f Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Thu, 2 Aug 2018 12:01:51 +0100 Subject: [PATCH 2/2] Update ReactART.js --- packages/react-art/src/ReactART.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/react-art/src/ReactART.js b/packages/react-art/src/ReactART.js index 096fe207edf7e..ccb2eeb5c5ed9 100644 --- a/packages/react-art/src/ReactART.js +++ b/packages/react-art/src/ReactART.js @@ -136,7 +136,7 @@ ARTRenderer.injectIntoDevTools({ findFiberByHostInstance: () => null, bundleType: __DEV__ ? 1 : 0, version: ReactVersion, - rendererPackageName: 'react-art-renderer', + rendererPackageName: 'react-art', }); /** API */