Created
November 16, 2018 19:18
-
-
Save productioncoder/fdb8b2b81690b34f9082a19dc873e3eb to your computer and use it in GitHub Desktop.
Youtube in React: total amount of comments selector
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 getAmountComments = createSelector( | |
getVideoById, | |
(video) => { | |
if (video) { | |
return video.statistics.commentCount; | |
} | |
return 0; | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment