Skip to content
This repository was archived by the owner on Jun 26, 2020. It is now read-only.

No way to know element key #148

Closed
salehe opened this issue Aug 15, 2015 · 1 comment
Closed

No way to know element key #148

salehe opened this issue Aug 15, 2015 · 1 comment

Comments

@salehe
Copy link

salehe commented Aug 15, 2015

There is no way to know an element's key in React tab. It is omitted on the left pane and is not a prop anymore to be shown in the right pane.

image

As a walk-around, you can look for $key in data-reactid attribute in Chrome's own Elements tab or use $r._reactInternalInstance, but these are not the best solutions.

@istrel
Copy link

istrel commented Aug 24, 2015

+1

Timothee pushed a commit to AdRoll/react-devtools that referenced this issue Feb 18, 2016
Fixes facebook#148.
Fixes facebook#226.

If a `key` or `ref` is set on the React element, it's displayed before
the `props` in the tree view and in the `PropState` sidebar.

If none is set, nothing is changed.

Also removed a piece of code `Node.js` that would never run. (condition
is checked in the previous block that `return`s)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants