Skip to content

Instantly share code, notes, and snippets.

@jangbl
Created December 17, 2018 16:18
Show Gist options
  • Select an option

  • Save jangbl/f74a9e04db3f03d6274e61f2c4ff675d to your computer and use it in GitHub Desktop.

Select an option

Save jangbl/f74a9e04db3f03d6274e61f2c4ff675d to your computer and use it in GitHub Desktop.
Youtube in React: update mapStateToProps in HomeContent to pull the videos per category in
/*...*/
import {getMostPopularVideos, getVideosByCategory} from '../../../store/reducers/videos';
/* ... */
function mapStateToProps(state) {
return {
videosByCategory: getVideosByCategory(state),
mostPopularVideos: getMostPopularVideos(state),
};
}
export default connect(mapStateToProps, null)(HomeContent);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment