Created
October 29, 2018 20:40
-
-
Save productioncoder/ee802975a6cf2c0a7399447b203ef919 to your computer and use it in GitHub Desktop.
Youtube selectors: video categories loaded and videos by category loaded
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export const videoCategoriesLoaded = createSelector( | |
state => state.videos.categories, | |
(categories) => { | |
return Object.keys(categories || {}).length !== 0; | |
} | |
); | |
export const videosByCategoryLoaded = createSelector( | |
state => state.videos.byCategory, | |
(videosByCategory) => { | |
return Object.keys(videosByCategory || {}).length; | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment