nanoid 2.1.7 → 2.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3 -0
- package/README.md +4 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/README.md
CHANGED
@@ -176,13 +176,12 @@ between renders. This is bad code:
|
|
176
176
|
<Item key={nanoid()} /> /* DON’T DO IT */
|
177
177
|
```
|
178
178
|
|
179
|
-
This is good code. `
|
179
|
+
This is good code. `id` will be generated only once:
|
180
180
|
|
181
181
|
```jsx
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
}
|
182
|
+
const Element = () => {
|
183
|
+
const [id] = React.useState(nanoid)
|
184
|
+
return <Item key={id}>
|
186
185
|
}
|
187
186
|
```
|
188
187
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "nanoid",
|
3
|
-
"version": "2.1.
|
3
|
+
"version": "2.1.8",
|
4
4
|
"description": "A tiny (137 bytes), secure URL-friendly unique string ID generator",
|
5
5
|
"keywords": [
|
6
6
|
"uuid",
|
@@ -28,6 +28,6 @@
|
|
28
28
|
],
|
29
29
|
"sharec": {
|
30
30
|
"config": "@logux/sharec-config",
|
31
|
-
"version": "0.5.
|
31
|
+
"version": "0.5.6"
|
32
32
|
}
|
33
33
|
}
|