Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Youtube in React: dynamic subscriber button text
getSubscriberButtonText() {
const {channel} = this.props;
const parsedSubscriberCount = Number(channel.statistics.subscriberCount);
const subscriberCount = getShortNumberString(parsedSubscriberCount);
return `Subscribe ${subscriberCount}`;
}
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.