Skip to content

Commit 261ff26

Browse files
committed
Document nanoid API
1 parent 3080bdd commit 261ff26

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/api/otherExports.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,17 @@ function isPlain(val) {
133133
}
134134
```
135135

136+
### `nanoid`
137+
138+
An inlined copy of [`nanoid/nonsecure`](https://github.com/ai/nanoid). Generates a non-cryptographically-secure random ID string. Automatically used by `createAsyncThunk` for request IDs, but may also be useful for other cases as well.
139+
140+
```js
141+
import { nanoid } from '@reduxjs/toolkit'
142+
143+
console.log(nanoid())
144+
// 'dgPXxUz_6fWIQBD8XmiSy'
145+
```
146+
136147
## Exports from Other Libraries
137148

138149
### `createNextState`

0 commit comments

Comments
 (0)