Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inject react-art renderer into react-devtools #13173

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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.
yunchancho committed Aug 2, 2018
commit 541589529357dc9c13312a7cf55ce8d67fcc8ce1
8 changes: 8 additions & 0 deletions packages/react-art/src/ReactART.js
Original file line number Diff line number Diff line change
@@ -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;