Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Youtube in React: pull in video by id using a selector
/* ... */
import {getVideoById} from '../../../store/reducers/videos';
/* ... */
function mapStateToProps(state, props) {
return {
video: getVideoById(state, props.videoId)
export default connect(mapStateToProps, null)(WatchContent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.