79336149

Date: 2025-01-07 13:25:36
Score: 1.5
Natty:
Report link

This has been introduced in Vue version 3.5

https://vuejs.org/api/composition-api-helpers#useid

<script setup>
import { useId } from 'vue'

const id = useId()
</script>

<template>
  <form>
    <label :for="id">Name:</label>
    <input :id="id" type="text" />
  </form>
</template>
Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: Max