Skip to content

Instantly share code, notes, and snippets.

@productioncoder
Created December 17, 2018 16:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save productioncoder/f74a9e04db3f03d6274e61f2c4ff675d to your computer and use it in GitHub Desktop.
Save productioncoder/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