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