Skip to content

Commit 25af186

Browse files
authored
Fix type error in Redux Essentials.
1 parent 5d8415d commit 25af186

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export const SinglePostPage = ({ match }) => {
5555
const { postId } = match.params
5656

5757
const post = useSelector(state =>
58-
state.posts.find(post => post.id === postId)
58+
state.posts.find(post => post.id.toString() === postId)
5959
)
6060

6161
if (!post) {

0 commit comments

Comments
 (0)