Skip to content

Commit

Permalink
Update part-4-using-data.md (#4746)
Browse files Browse the repository at this point in the history
Fixed a typo and changed highlighting
  • Loading branch information
matthiasnagel authored Oct 27, 2024
1 parent 05ba9d1 commit 025adaa
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/tutorials/essentials/part-4-using-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -562,13 +562,15 @@ const postsSlice = createSlice({
// as an argument, not the entire `RootState`
selectAllPosts: postsState => postsState,
selectPostById: (postsState, postId: string) => {
return postsState.find(user => post.id === postId)
return postsState.find(post => post.id === postId)
}
}
// highlight-end
})

// highlight-start
export const { selectAllPosts, selectPostById } = postsSlice.selectors
// highlight-end

export default postsSlice.reducer

Expand Down

0 comments on commit 025adaa

Please sign in to comment.