Solar power, a beacon of hope amid the grim news about climate change, faced major obstacles in 2018 that had even solar optimists fearing its astonishing run of growth would come to an end. Yet once again it has beaten the naysayers.

SolarPower Europe announced at its annual summit that yet again more solar cells were added worldwide than ever before, passing the long-sought 100 gigawatt (GW) barrier for the first time. All this despite hostility from the White House, trade wars raising the cost of panels in many places, and most damaging of all, the Chinese government capping new solar projects.

It took more than 20 years from the production of the first commercial solar cell to the worldwide installation of a solar gigawatt. At the turn of the millennium, all the solar power in the world could not have powered a middle-sized city. Most efforts to map a path to a clean energy future didn't see solar power as being a significant factor until mid-century, if at all.

Since then, the amount of solar in the world has doubled every two to three years. The more cells installed, the more economies of scale and improved production techniques brought down costs, further increasing demand. If that trend were to continue, the entire world's electricity supply would be pure solar power by 2030. No one expects that to happen, so at some point, this exponential growth has to fade. Last June, it looked like 2018 would be the year – many feared less additional capacity would be added than in 2017.

The solar industry's weakness has been that not only has it been dependent on subsidies from governments keen to find non-polluting alternatives, but that many of these were designed to kick-start the technology, not to be permanent supports. If these were withdrawn too quickly, the fear ran, and the virtuous circle of growth and lower prices would come to a shuddering halt.

The vulnerability was increased by the fact that, while many nations played a part, for most of the last two decades solar has been dependent on one country at a time. In 2000 almost half the world's solar panels were in Germany. China took over as the solar champion just as Germany wound its subsidies back.

So when China imposed its cap in May, many predicted disaster. If the nation that installed more than half the world's solar in 2017 was cutting back, who would replace them? It turned out, everyone.

Globally 104GW were installed, up from 99GW in 2017. China fell 16 percent to 44GW, but previously small markets from Africa to the Netherlands made up for it.

With more and more solar being installed without subsidies, and the industry less dependent on any one nation, the future looks sunny.