As French President Emmanuel Macron wrapped up his first official visit to China, there are signs that Beijing's relationship with Europe is shifting.

The French politician's first official visit to China is notable for coming as other leaders of the Western world struggle domestically. In fact, Macron appeared as "perhaps the leader of Europe at this very moment" said Philippe le Corre, a research fellow at the Harvard Kennedy School.

British Prime Minister Theresa May, who herself has a China trip set for the end of January, continues to face questions about Brexit and her own leadership; Germany's Angela Merkel is struggling to form a coalition; and the U.S. is facing political turmoil under Donald Trump's administration.

For his part, Macron is "clearly eyeing" a "special strategic partnership" with China, said Alicia Garcia-Herrero, chief economist for Asia Pacific at French bank Natixis, pointing to China's consumers grow hungrier for what France has to offer.

During his campaign, the French leader took a "slightly negative" approach to China by pushing for a European-level investment protection agency, but that development seems to have lost ground, Garcia-Herrero said.

Instead, Macron appears to be taking a different angle with China.

"Macron seems to have come to the realization that he had better be on the right side of the table under China's divide and conquer strategy in Europe, i.e. a more accommodating stance towards China," she wrote.

As much as Macron is wooing China, Beijing is also reaching out to Europe through its ambitious Belt and Road Initiative that aims to connect Asia, Europe, the Middle East and Africa with a vast logistics and transport network.

For China, France's pivot to closer ties could be beneficial for its overall standing in Europe: A "divide and conquer" strategy will help diversify its power, as sentiment toward the East Asian giant turns sour in Germany, Garcia-Herrero added.

That shift comes as China is now producing more of its own machinery and automobiles instead of importing them from countries like Germany — and it's now even competing with the European powerhouse in third markets, she said.