Skip to content

Commit

Permalink
Document nanoid API
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Apr 5, 2020
1 parent 3080bdd commit 261ff26
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/api/otherExports.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,17 @@ function isPlain(val) {
}
```

### `nanoid`

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.

```js
import { nanoid } from '@reduxjs/toolkit'
console.log(nanoid())
// 'dgPXxUz_6fWIQBD8XmiSy'
```

## Exports from Other Libraries

### `createNextState`
Expand Down

0 comments on commit 261ff26

Please sign in to comment.