NAIROBI, Kenya — For decades Africa was eager for a new narrative, and in recent years it got a snappy one.

The Economist published a cover story titled “Africa Rising.” A Texas business school professor published a book called “Africa Rising.” And in 2011, The Wall Street Journal ran a series of articles about economic growth on the continent, and guess what that series was called?

“Africa Rising.”

The rise seemed obvious: You could simply stroll around Nairobi, Kenya’s capital, or many other African capitals, and behold new shopping malls, new hotels, new solar-powered streetlights, sometimes even new Domino’s pizzerias, all buoyed by what appeared to be high economic growth rates sweeping the continent.

For so long Africa had been associated with despair and doom, and now the quality of life for many Africans was improving. Hundreds of thousands of Rwandans were getting clean water for the first time. In Kenya, enrollment in public universities more than doubled from 2007 to 2012. In many countries, life expectancy was increasing, infant mortality decreasing.