China is still spending billions in Africa despite its economic slowdown, inking trade deals, investing in mining and infrastructure, and offering development aid.

Just this week, during a visit to the continent, China's President Xi Jinping agreed to invest $6.5 billion in South Africa.

China's rapid ascent to the world's second-largest economy has meant high demand for energy and raw materials. It has long courted Africa to gain access to the region's rich natural resources -- over the years, China has invested and helped to develop Africa's energy industries.

Xi, in particular, has made it a priority -- Africa was his first overseas stop after taking office in 2013. And by the end of that year, China's direct investment in African countries totaled about $26 billion, according to the Brookings Institution.

Under Xi, China has also made more financing available to Africa. China has issued at least $10 billion in loans to African countries as part of a larger funding package, prioritizing infrastructure, agricultural and manufacturing, according to the Council of Foreign Relations.

And there's much more to come. China has pledged to provide $1 trillion in financing to African countries by 2025, Brookings cited an official at the Export-Import Bank of China as saying.

Trade relations also continue to grow. In 2009, China surpassed the U.S. as Africa's top trade partner. China's trade with Africa hit nearly $200 billion in 2012, according to Brookings.