Skip to content

Instantly share code, notes, and snippets.

@productioncoder productioncoder/Watch.js
Last active Nov 11, 2018

Embed
What would you like to do?
Youtube in React: get channel id in Watch
/* ... */
export class Watch extends React.Component {
/* ... */
render() {
const videoId = this.getVideoId();
return (
<WatchContent videoId={videoId} channelId={this.props.channelId}/>
);
}
/* ... */
}
function mapStateToProps(state, props) {
return {
youtubeLibraryLoaded: getYoutubeLibraryLoaded(state),
channelId: getChannelId(state, props.location, 'v')
};
}
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.