DEV Community


Discussion on: The what, why and how behind labels

peetboy profile image

Hi Frank,
we are using Vue + BootstrapVue and the most use cases with repeated components are UI forms (banking sector, regulatory forms) where user wants to see all data on the screen. We have created own input components (or I would say wrappers around bootstrap components) and the labels were with explicit approach hence yes, we had to combine index with the ID to get unique identifiers. This of course added a complexity (although small) on other places which we did not expect. But still it doesn't look OK to me that we have to generate IDs just because of label or otherwise we would not need them. There is no need to have ID in Vue app and if you need specifically work with some DOM element, you can use refs instead.