The question is fairly simple, but I haven't found any answers on the web.
At the moment I have found two ways of getting the UI's values:
Setting up an
<aura:attribute type='Object' name='myName' />
and then using thecomponent.get('v.myName')
to get its value.Give an
aura:id
to each UI component to later docomponent.find('myAuraId').get('v.value')
.
Obviously, most of the times it's much faster to simply use the aura:id
method, but one part of me thinks it's less performant due to the fact that it's a find. So, in a nutshell, which one is a best? Or is one better than the other for different scenarios?