import React from 'react' import { useSelector } from 'react-redux' export const SinglePostPage = ({ match }) => { const { postId } = match.params const post = useSelector(state => state.posts.find(post => post.id === postId) ) if (!post) { return ( <section> <h2>Post not found!</h2> </section> ) } return ( <section> <article className="post"> <h2>{post.title}</h2> <p className="post-content">{pos
![Redux Essentials, Part 4: Using Redux Data | Redux](https://cdn-ak-scissors.b.st-hatena.com/image/square/99db7420e259bb57969471211030fc7736d09dd3/height=288;version=1;width=512/https%3A%2F%2Fredux.js.org%2Fimg%2Fredux-logo-landscape.png)