---
title: "Create unique keys for map elements that don't have unique property"
url: https://daily.dev/posts/create-unique-keys-for-map-elements-that-don-t-have-unique-property-nghqe05k8
source_url: https://reactjsexample.com/create-unique-keys-for-map-elements-that-dont-have-unique-property/
type: article
source: "React.js Examples"
published: 2022-02-19T06:43:54.706Z
updated: 2022-02-19T06:43:54.710Z
tags: ["react"]
reading_time: 1
upvotes: 6
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Create unique keys for map elements that don't have unique property

**[React.js Examples](https://daily.dev/sources/reactexample)** · 1 min read · 6 upvotes · 0 comments

## Summary

Small helper library to generate unique keys for map in react when you don't have unique property. Works with any type of data - arrays, objects, strings, numbers... Use getUniqueKey to create a unique key for your map. Use useGetUniqueKey ( ) to generate a key for a map.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://reactjsexample.com/create-unique-keys-for-map-elements-that-dont-have-unique-property/>

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments

---

Tags: [#react](https://daily.dev/tags/react)

[View this post on daily.dev](https://daily.dev/posts/create-unique-keys-for-map-elements-that-don-t-have-unique-property-nghqe05k8)
