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 CHANGED
@@ -1,6 +1,9 @@
1
1
  # Change Log
2
2
  This project adheres to [Semantic Versioning](http://semver.org/).
3
3
 
4
+ ## 2.1.8
5
+ * Improve React docs (by Nahum Zsilva).
6
+
4
7
  ## 2.1.7
5
8
  * Reduce `index`, `async` and `non-secure` size (by @polemius).
6
9
 
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. `this.id` will be generated only once:
179
+ This is good code. `id` will be generated only once:
180
180
 
181
181
  ```jsx
182
- id = nanoid()
183
- render () {
184
- return <Item key={this.id}>;
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.7",
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.3"
31
+ "version": "0.5.6"
32
32
  }
33
33
  }