Use global id for debugcomponent id
Summary: Global Id is stable as the component is rerendered. It is not stable if the whole component tree updates so we might want to deal with this in the future Reviewed By: lblasa Differential Revision: D41581346 fbshipit-source-id: 0c2834ba452ddcfc3e0a7392672825fc040901d9
This commit is contained in:
committed by
Facebook GitHub Bot
parent
cffe42a93a
commit
d0a05ad1a9
@@ -26,7 +26,7 @@ class DebugComponentDescriptor(val register: DescriptorRegister) : NodeDescripto
|
||||
* Debug component is generated on the fly so use the underlying component instance which is
|
||||
* immutable
|
||||
*/
|
||||
override fun getId(node: DebugComponent): Id = System.identityHashCode(node.component)
|
||||
override fun getId(node: DebugComponent): Id = node.globalKey.hashCode()
|
||||
|
||||
override fun getName(node: DebugComponent): String = node.component.simpleName
|
||||
|
||||
|
||||
Reference in New Issue
Block a user