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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add component name to overlay #5

Merged
merged 1 commit into from
May 1, 2020
Merged

Conversation

raunofreiberg
Copy link
Owner

To get the ball rolling on #4.

Also, modified colors a bit to match the current theme 馃拝

image

const [component] = Object.keys(node)
.filter(key => key.startsWith('__reactInternalInstance$'))
.map((key: string) => {
const fiberNode = (node as any)[key];
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't figure the types out here so I just told TS to shut up, for now.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't be afraid to tell TS to shut it's annoying whining from time to time!

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How else would you expect it to learn some manners 馃槃

@chaance
Copy link
Collaborator

chaance commented May 1, 2020

Looks good to me!

@raunofreiberg raunofreiberg merged commit 2cdd646 into master May 1, 2020
@raunofreiberg raunofreiberg deleted the feat/component-trace branch May 1, 2020 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants