Skip to content

Commit cb31d8c

Browse files
committed
fix createEntityAdapter call in docs
1 parent bc1bf8e commit cb31d8c

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
@@ -48,9 +48,9 @@ import {
4848

4949
type Book = { bookId: string; title: string }
5050

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

0 commit comments

Comments
 (0)