reactjs-id
Version:
A function that generates unique identifiers which can be used when mapping through list of items in React.Js
14 lines (12 loc) • 553 B
Markdown
<h2>ReactId is a function that generates unique identifiers which can be used when mapping through list of .items in React.Js.</h2>
<h2>How to Install:</h2>
<h3>Run npm install reactjs-id in your CLI</h3>
<h2>How do I use ReactId in my project?</h2>
<ul>
<li>Simply import {ReactId} from "reactjs-id";</li>
<li>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>)` </li>
</ul>
>