Skip to content

v1.3.4

Compare
Choose a tag to compare
@markerikson markerikson released this 05 Apr 19:13
· 3851 commits to master since this release

This release updates our internal nanoid implementation, and exports it for general usage.

Changes

Export nanoid

The new createAsyncThunk API we added in v1.3.0 auto-generates a unique request ID every time it's called, so that your reducers can distinguish between separate calls if necessary. To do this, we inlined a copy of the nanoid/non-secure API into RTK.

The nanoid library just released a new version, so we've updated our inlined copy to match the implementation of nanoid/non-secure as of 3.0.2.

Since the API is already in the codebase, we've exported it publicly in case it's useful. Usage:

import { nanoid } from '@reduxjs/toolkit'

console.log(nanoid())
// 'dgPXxUz_6fWIQBD8XmiSy'

Changelog

v1.3.3...v1.3.4