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.
2 parents a0d51ef + f08205f commit 2d22490Copy full SHA for 2d22490
docs/api/createEntityAdapter.mdx
@@ -46,9 +46,9 @@ import {
46
47
type Book = { bookId: string; title: string }
48
49
-const booksAdapter = createEntityAdapter<Book>({
+const booksAdapter = createEntityAdapter({
50
// Assume IDs are stored in a field other than `book.id`
51
- selectId: (book) => book.bookId,
+ selectId: (book: Book) => book.bookId,
52
// Keep the "all IDs" array sorted based on book titles
53
sortComparer: (a, b) => a.title.localeCompare(b.title),
54
})
0 commit comments