Skip to content

Commit

Permalink
Update Part 7
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson committed Jul 28, 2024
1 parent 13ccf68 commit e1ece05
Show file tree
Hide file tree
Showing 2 changed files with 83 additions and 33 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/essentials/part-6-performance-normalization.md
Original file line number Diff line number Diff line change
Expand Up @@ -1113,11 +1113,11 @@ export const {
selectById: selectPostById,
selectIds: selectPostIds
// Pass in a selector that returns the posts slice of state
} = postsAdapter.getSelectors(state => state.posts)
} = postsAdapter.getSelectors((state: RootState) => state.posts)
// highlight-end

export const selectPostsByUser = createSelector(
[selectAllPosts, (state, userId) => userId],
[selectAllPosts, (state: RootState, userId: string) => userId],
(posts, userId) => posts.filter(post => post.user === userId)
)
```
Expand Down
Loading

0 comments on commit e1ece05

Please sign in to comment.