@over-ui/use-id
TypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

over-ui/use-id

React 18버전에서 등장한 useId 훅이 존재하지 않을 시 커스텀훅으로 대체하기 위한 훅입니다. useId가 존재한다면, React.useId를 사용하고 존재하지 않는다면 useSafeId를 사용해 고유한 id를 생성합니다.

usage

import * as useId from "@over-ui/use-id"

const Toggle = () => {

    const id = useId()
    return ...
}

Readme

Keywords

none

Package Sidebar

Install

npm i @over-ui/use-id

Weekly Downloads

3

Version

1.1.1

License

MIT

Unpacked Size

21.6 kB

Total Files

8

Last publish

Collaborators

  • lv0314
  • otterp012