reactjs-id

1.0.6 • Public • Published

ReactId is a function that generates unique identifiers which can be used when mapping through list of .items in React.Js.

How to Install:

Run npm install reactjs-id in your CLI

How do I use ReactId in my project?

  • Simply import {ReactId} from "reactjs-id";
  • Next, invoke ReactId() in the component you need it. This could be your list component,

for instance: let mappedDessert = desserts.map(desert => <li key={ReactId()}>{desert.name} - {desert.calories} cal</li>)

Package Sidebar

Install

npm i reactjs-id

Weekly Downloads

21

Version

1.0.6

License

MIT

Unpacked Size

218 kB

Total Files

23

Last publish

Collaborators

  • vintage-creator