Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Youtube selectors: video categories loaded and videos by category loaded
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
You can’t perform that action at this time.