From 07dbd86ca421c262157af673a2584a40fd3b2450 Mon Sep 17 00:00:00 2001 From: Oliver Williams Date: Thu, 14 Apr 2022 01:59:42 +0100 Subject: [PATCH] add crypto.randomUUID as source of keys (#4165) Co-authored-by: Oliver Williams --- beta/src/pages/learn/rendering-lists.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beta/src/pages/learn/rendering-lists.md b/beta/src/pages/learn/rendering-lists.md index 41dd66f8..f1710fe6 100644 --- a/beta/src/pages/learn/rendering-lists.md +++ b/beta/src/pages/learn/rendering-lists.md @@ -390,7 +390,7 @@ Fragments disappear from the DOM, so this will produce a flat list of `

`, `< Different sources of data provide different sources of keys: * **Data from a database:** If your data is coming from a database, you can use the database keys/IDs, which are unique by nature. -* **Locally generated data:** If your data is generated and persisted locally (e.g. notes in a note-taking app), use an incrementing counter or a package like [`uuid`](https://www.npmjs.com/package/uuid) when creating items. +* **Locally generated data:** If your data is generated and persisted locally (e.g. notes in a note-taking app), use an incrementing counter, [`crypto.randomUUID()`](https://developer.mozilla.org/en-US/docs/Web/API/Crypto/randomUUID) or a package like [`uuid`](https://www.npmjs.com/package/uuid) when creating items. ### Rules of keys {/*rules-of-keys*/}