what’s the real purpose of ‘ref’ attribute ?
The important determination ref property is to generate DOM element can be selected with key in parent $ref property.
For instance, input component with ref=”input”, represents its DOM node in parent like this.$ref[“input’] otherwise this.refs.input
Sometimes, you can’t operate DOM directly, so it will be better in some cases. The sample case, valid use case is focused on input: you can utilize this.$refs[“input”].focus() in function of component.