The Sino-French War was a conflict that took place between November 1882 and March 1883.
After being defeated in the Hohenzollerns' War, France was looking for ways to recover its position as the most powerful nation in continental Europe, something that was not helped by the fact that the Third Republic fell to a peaceful revolution, transforming France into a Kingdom.
When the period known as the Second Colonization started, France began to look for objectives to expand their holdings, increase their size and regain the position that had been stolen by Germany. One of the places they were interested in was Vietnam, right next to their Tonkin port and the Cochinchina colony, which could be an excellent market. The problem was that Vietnam was a vassal to China, so they had to find some way to force them to transfer that vassalship to them.
They got their wish when French missionaries complained about being assaulted while they spread the Word of God to the native Vietnamites. Commandant Henri Riviére led an expedition that took the city of Hanoi. The Vietnamese asked the Black Flag Army (a bandit force that controlled the Red River) and the Chinese to support them. The Chinese then invaded Tonkin, ostensibly to prevent the French from using the French port in Tonkin to invade the rest of the region. The French answered by declaring war several months later.
The French Kingdom, seeing that they had a great chance of gaining control of new colonies and regain their greatness, had been sending reinforcements to Cochinchina and Tonkin so as to ensure superiority in the battlefield. Their first target was the Vietnamese Army, which was small in comparaison to the Indochinese French Army and much worse equipped. The IFA only needed two months to sweep the Vietnamese away. Of course, the Black Flag Army was a different issue, as they tended to engage in the guerrilla warfare that had been used so many times against the French Army, but this time they were prepared. Still, it would take several years until the BFA was eliminated.
Meanwhile, the Chinese were a different nut to crack. The number of soldiers the Chinese could field exceeded by much what the French could deploy, but, unlike it happened in the Hohenzollerns' War, the technological gap between the armies would be fundamental in determining the outcome of the war. This was proven in the several battles that happened between the French and the Chinese, with the greatest of them being the Battle of Nui Bop: 2,500 French troops faced six times their number in Chinese soldiers, and by the end of the day 1,000 Chinese troops had died against the well-prepared Frenchmen, who only lost 34 soldiers to death and 56 to injury: two of the deceased and three of the surviving soldiers would be granted the Légion d'honneur, the highest condecoration of the Kingdom of France.
Another catastrophical defeat happened near the port city of Foochow, where the modern French ships utterly destroyed the obsolete Chinese ships (the Chinese government had asked the German and Spanish governments to sell them modern steamships, but these were still under construction when the war began) without suffering little losses in terms of sailors, and none in terms of ships.
The Chinese did win a few times, though: for example, the Battle of Ningming, where the Chinese were able to push back a French army of 3,000 thanks to their knowledge of the terrain and their numbers.
Despite these victories, the French were able to press on and achieve further victories, prompting the Chinese to ask for peace terms.
In the Treaty of Hainan, China was forced to cede the islands of Hainan and Taiwan, as well as two new concessions in Kwang-Chou-Wan and Hankou, to the French, clearly showing the great victory the French had gained. They were also forced to accept that the Kingdom of Vietnam was now a French protectorate, being unable to prevent them from establishing total control over most of Indochina during the following years.