The Kingdom of France was a long-time rival of England and then England-centric Great Britain. To name an example of their conflicts, it lost every single one of its North American holdings in 1763 because of the Seven Years’ War, meaning that it was eager for an opportunity to take revenge. Said chance came when Great Britain fell out with its American colonies.
Initially, the French government preferred more covert forms of support. For example, it sold gunpowder as well as ammunition. Similarly, it made French ports available to American ships predating upon British merchant vessels. On top of this, the French government even provided economic assistance. All of which contributed to the Americans’ ability to stay in the war despite Great Britain’s much superior resources.
Some of the French supported the Americans because of genuine conviction. However, the French government was much more cautious, both because of the expected costs and because of the inevitable risks of a conflict with a peer power.
It wasn’t until the Americans won the Battle of Saratoga in 1777 that the French government realized that they could actually win the war. As such, its choices had been reduced to either abandoning the Americans or giving the Americans full assistance. In the end, it was King Louis XVI who decided on the latter course of action.
The process started with the forming of an alliance on February 6 of 1778, which came complete with France’s formal recognition of the United States of America as an independent country in its own right. Perhaps unsurprisingly, Great Britain reacted with hostility, as shown by the two countries’ declaration of war upon one another.
In April, France sent a fleet to North America under Charles Hector, Comte d’Estaing. The British could’ve intercepted the fleet but refrained because they were concerned that a separate fleet at Brest could be used to launch an invasion of Britain itself, something that was considered by the French but rejected because of the logistical challenges involved.
Besides this, France also won the diplomatic game in this particular conflict. It was able to secure the support of Austria, thus guaranteeing the safety of its continental interests. Furthermore, it was able to secure the support of both Spain and the Dutch Republic. Spain would eventually join the war against Great Britain in 1779, while the Dutch Republic would eventually have Great Britain declare war against it in 1780 because of accusations that it had violated its neutrality.