Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Youtube in React: Related videos in WatchContent
import {getRelatedVideos, getVideoById} from '../../../store/reducers/videos';
/* ... */
function mapStateToProps(state, props) {
return {
relatedVideos: getRelatedVideos(state, props.videoId),
video: getVideoById(state, props.videoId)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment