React & React Native

useId

Në shqip përdoret i njëjti emër.

ShpjegimiSQ

useId krijon një ID unike dhe të qëndrueshme për një komponent — e dobishme për të lidhur <label> me <input> përmes htmlFor, edhe kur komponenti shfaqet disa herë në faqe.

EnglishEN

useId creates a unique, stable ID for a component — useful for linking a <label> to an <input> through htmlFor, even when the component appears several times on the page.

Si ta mendosh

Si numri i dollapit që i jepet çdo nxënësi automatikisht.

Lexoje në anglisht

Like a locker number assigned to each student automatically.

Shembull kodijavascript

const id = useId();
<label htmlFor={id}>Email</label>
<input id={id} type="email" />

Terma të lidhur