Skip to content

Commit 2d22490

Browse files
authored
Merge pull request #3490 from reduxjs/docs-fix
2 parents a0d51ef + f08205f commit 2d22490

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/api/createEntityAdapter.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ import {
4646

4747
type Book = { bookId: string; title: string }
4848

49-
const booksAdapter = createEntityAdapter<Book>({
49+
const booksAdapter = createEntityAdapter({
5050
// Assume IDs are stored in a field other than `book.id`
51-
selectId: (book) => book.bookId,
51+
selectId: (book: Book) => book.bookId,
5252
// Keep the "all IDs" array sorted based on book titles
5353
sortComparer: (a, b) => a.title.localeCompare(b.title),
5454
})

0 commit comments

Comments
 (0)