In a provocative long piece published this Sunday, my colleague Marc Fisher explained why the future of baseball, long considered America's pastime, looks so grim. Kids aren't playing baseball as frequently as they used to. Nor are they watching it as often as they once did. Audiences are getting older and older each year.

But not all sports are failing to connect with millennials, who make up the fastest-growing segment of the population. In fact basketball looks particularly poised for success.

Football remains the most popular sport in this country in terms of overall TV ratings. But the average age of people who are watching football is rising, whereas the age of basketball viewers has remained remarkably stable, suggesting that even as basketball fans age, new younger viewers keep tuning in. Over the past decade, the average viewer of ESPN's professional basketball broadcasting hasn't budged at all—it's been 37 years old since at least 2004. The average football viewer, however, has climbed from 43 years old to to 47. For baseball it has been even worse—it has gone from 46 years old to 53.

But it isn't merely the National Basketball Association's ability to attract the youth to television sets around the country that bodes well for the future of the sport. Basketball has also proved to be popular on newer platforms like Vine and Snapchat, where short clips and highlights are shared, in a way other sports have not. At the very least, people have been more eager to post basketball videos and view them. A cursory search on Vine shows that just under 100,000 videos have been posted with the tag NBA, while fewer than 50,000 have been posted with the tag NFL, and fewer than 15,ooo with the tag MLB.

And in general, the league and its stars tend to be active users of social media platforms like Facebook, Twitter, and Instagram, often showing off their style.

"Young basketball stars today are ingrained in culture and fashions and life in a way that the stars from other sports here are not," said Darren Rovell, who covers the business of sports for ESPN. "People talk about Russell Westbrook's glasses and Dwyane Wade's shoes. When you look at the numbers in terms of most Twitter and Instagram followers, the NBA blows other sports away."

An analysis of the top grossing athletes in the world by Forbes last year showed that 18 of the top 100 were basketball players, who together had more than 150 million followers on Facebook. Twenty, meanwhile, were baseball players, who collectively had fewer than 13 million followers. And the 13 football players who cracked the top 100 highest paid athletes didn't even eclipse 10 million followers when they were added together.

Even the NBA's official Twitter account has more followers (13.8 million) than the NFL's (10.8 million) and the MLB's (4.3 million). The National Hockey League (NHL), for those who are wondering, has 3.3 million followers on its official Twitter account.

"Young kids have an insatiable appetite to know what's going on off the court or field, and the NBA has been much better about feeding that," said Rovell. "NBA players, whether they understand it or not, are providing the kind of content millennials want."

The NBA's new broadcasting deal—which is worth $2.6 billion per year and runs through the 2024-2025 season—is a testament to how bright basketball's future looks right now. And this is going on even though the teams in the NBA's biggest media markets are doing terribly this season (see: the New York Knicks and the Los Angeles Lakers).

But while basketball might be poised to succeed in a world where sports leagues chase younger, more finicky viewers, the key to capitalizing on its favorable audience and comparatively large and active social media presence will likely be figuring out how to monetize the two down the road, when sports rely less on traditional channels and more on alternative, new forms of engagement. What exactly that will look like is yet unclear, but it's not hard to envision a time, not too long from now, when millennials' can chew on the kinds of bite-sized broadcasts they seem to value.

"In your Twitter feed, it's going to say 'two minutes left in so-and-so game, click now for a dollar to watch the end,'" Rovell said. "That's where the real money is down the road. And it's going to happen sooner than you think."