At the moment, when you drag a component onto the app canvas, it gets an auto-generated ID hash. This hash won't change unless you delete it, so you can retreive it by inspecting the phone canvas in the editor:
It's a bit roundabout way now – being able to set the element ID is on the roadmap! Note that the
id points to the containing
<div> for the component, so the actual component code (as visible in the component code editor) is inside that element.