Skip to content

Commit 025adaa

Browse files
Update part-4-using-data.md (#4746)
Fixed a typo and changed highlighting
1 parent 05ba9d1 commit 025adaa

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/tutorials/essentials/part-4-using-data.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -562,13 +562,15 @@ const postsSlice = createSlice({
562562
// as an argument, not the entire `RootState`
563563
selectAllPosts: postsState => postsState,
564564
selectPostById: (postsState, postId: string) => {
565-
return postsState.find(user => post.id === postId)
565+
return postsState.find(post => post.id === postId)
566566
}
567567
}
568568
// highlight-end
569569
})
570570

571+
// highlight-start
571572
export const { selectAllPosts, selectPostById } = postsSlice.selectors
573+
// highlight-end
572574

573575
export default postsSlice.reducer
574576

0 commit comments

Comments
 (0)