We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bc1bf8e commit cb31d8cCopy full SHA for cb31d8c
docs/api/createEntityAdapter.mdx
@@ -48,9 +48,9 @@ import {
48
49
type Book = { bookId: string; title: string }
50
51
-const booksAdapter = createEntityAdapter<Book>({
+const booksAdapter = createEntityAdapter({
52
// Assume IDs are stored in a field other than `book.id`
53
- selectId: (book) => book.bookId,
+ selectId: (book: Book) => book.bookId,
54
// Keep the "all IDs" array sorted based on book titles
55
sortComparer: (a, b) => a.title.localeCompare(b.title),
56
})
0 commit comments