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 05ba9d1 commit 025adaaCopy full SHA for 025adaa
docs/tutorials/essentials/part-4-using-data.md
@@ -562,13 +562,15 @@ const postsSlice = createSlice({
562
// as an argument, not the entire `RootState`
563
selectAllPosts: postsState => postsState,
564
selectPostById: (postsState, postId: string) => {
565
- return postsState.find(user => post.id === postId)
+ return postsState.find(post => post.id === postId)
566
}
567
568
// highlight-end
569
})
570
571
+// highlight-start
572
export const { selectAllPosts, selectPostById } = postsSlice.selectors
573
+// highlight-end
574
575
export default postsSlice.reducer
576
0 commit comments