Skip to content
This repository was archived by the owner on Jan 30, 2024. It is now read-only.
/ use-unique-id Public archive

A react hook for composing unique ids with a human readable prefix

License

Notifications You must be signed in to change notification settings

HomeX-It/use-unique-id

Folders and files

NameName
Last commit message
Last commit date

Latest commit

fa04597 Â· Sep 1, 2021

History

7 Commits
Sep 1, 2021
Dec 30, 2019
Jan 6, 2020
Dec 30, 2019
Dec 30, 2019
Dec 30, 2019
Dec 30, 2019
Jan 6, 2020
Dec 30, 2019
Jan 6, 2020
Jan 6, 2020
Jan 6, 2020
Dec 30, 2019
Dec 30, 2019
Dec 30, 2019

Repository files navigation

useUniqueId

useUniqueId is a react hook that generates unique ids with a human readable prefix. You can assign unique ids using a react component's name as the prefix allowing you to see the component's name in a browser's developer tools without opening react dev tools.

Install

npm install use-unique-id

OR

yarn add use-unique-id

Usage

useUniqueId('DropDownInput')

Before

using a random unique id generator

input field with uuid/v4 label

After

using useUniqueId

input field with use-unique-id label

use-unique-id uses uuid/v4 under the hood generating reliable universally unique identifiers (UUIDs).

🚀 Made with create-react-hook.


License

MIT © HomeX Labs