US President Donald Trump’s visit to China this week may have been short on immediate deals addressing frictions over tech and trade. But there’s little question that Chinese leader Xi Jinping will be viewing it as a resounding success.

Beijing didn’t need big tangible outcomes to achieve major wins, like projecting China as an equal to the US on the global stage, and directing the tone of the relationship – including around Taiwan.

Trump’s visit appears to have delivered on both.

The hours the two leaders spent together over Trump’s three-day stay were full of great-power bonhomie and effusive praise from the American president, who called the US-China relationship one of the “most consequential” in world history.

Even before the two sat down to talks, Trump told Xi he was sure the countries would have a “fantastic future.” Later over a state banquet, the US president said good relations between the two can create a “future of greater prosperity” for the world – a sentiment that jibed with Xi’s own toast.

All those soundbites and pats on the back created a fitting backdrop for China’s announcement of a new era of “constructive strategic stability” between the two powers – one focused on cooperation and managed competition, rather than the volatile rivalry of last year.

And the Chinese leader used his face time with Trump to make one thing very clear: the main thing that could derail a good rapport was Taiwan — China’s most important “red line” issue.

If Washington doesn’t handle that issue well, Xi told Trump on the visit’s first day, the entire US-China relationship will be put in “great jeopardy.” Beijing claims the self-ruling democracy as its own territory and opposes the US’ robust unofficial ties with Taipei.

Comments Trump gave reporters on his return trip aboard Air Force One suggest the president at the very least heard out Xi’s concerns, including over the US’ regular arms sales to Taiwan. They discussed the subject in “great detail,” Trump said, adding that he would “make a determination” on arms sales to the island soon.

China’s diplomats were well aware of the opportunity the trip afforded them.

They carefully crafted a spectacle of pomp and pageantry, calibrated to impress Trump, from a military gun salute to a rare trip inside the secretive Communist Party leadership compound known as Zhongnanhai.

And the US president reflected back just the kind of optics that China’s foreign policy establishment will relish. Trump arrived in Beijing with a phalanx of top American CEOs, who Trump told Xi were there to “pay their respect” to Xi and to China.

Being granted such deference by the leader of the world’s most powerful country speaks volumes about Beijing’s own status. That plays well for Xi domestically and abroad, where he aims to project China as an alternative leader to the US.

A predictable relationship with the US also buys Beijing time to continue its rise across technological, military and geopolitical fronts. US tech controls and tariffs – like those at the center of a tit-for-tat US-China trade war last year – can upend supply chains and hurt companies, slowing that momentum.

That’s true for the US too, which learned just how powerful China’s leverage is over the world’s supply of processed rare earths, when Beijing tightened its grip on these strategically critical materials to fight US tariffs last year.

While the White House’s official readout didn’t repeat Xi’s “constructive, strategic stability” phraseology, top American diplomat Marco Rubio told NBC News in an interview from Beijing that the US agreed with China’s emphasis on this “so that we don’t have misunderstandings that can lead to broader conflict.”

To be sure, a stable US-China relationship can have positive effects for the global economy, just as its frictions can upend trade.

But how that “strategic stability” is defined could also give China license to dispute US actions that it doesn’t see as supporting that stability, especially when it comes to the trade and tech issues that raised tensions last year.

But the takeaway that Beijing is sure to be most focused on in the wake of the trip is around Taiwan.

China’s Communist Party has never controlled Taiwan but views the island is an integral part of its territory. Absorbing it into China, by force if necessary, is central to Beijing’s vision for its “national rejuvenation” by 2049.

Xi didn’t appear to miss a beat in making this point, even subtly. In his toast welcoming Trump to the banquet, the Chinese leader didn’t mention Taiwan but drew a parallel between Trump’s “Make America Great Again” ethos and his own vision of a “great rejuvenation.”

Trump told Fox News’ Bret Baier in an interview that aired Friday night that “nothing has changed” about the United States’ policy toward Taiwan during the trip. He also said, however, that the two had “talked the whole night about that issue” – and he leaned into China’s view that Taiwan’s ruling party seeks independence.

“I will say this: I’m not looking to have somebody go independent, and you know we’re supposed to travel 9,500 miles to fight a war. I’m not looking for that. I want them to cool down. I want China to cool down,” Trump said.

The current ruling party in Taipei backs Taiwan’s sovereignty but its policy does not seek to change the status quo by declaring independence.

Taiwan is the seat of the government of the Republic of China (Taiwan’s official name), whose Nationalist forces previously ruled the mainland, but fled to the island after the Communist Party gained the upper hand in the Chinese Civil War in 1949. Taiwan had been surrendered to the ROC by imperial Japan at the end of World War II, just decades after Japan won the island from China’s Qing dynasty.

Under the “One China” policy, the US acknowledges China’s position that Taiwan is part of China but has never officially recognized the Communist Party’s claim to the island.

How the US handles its unofficial relationship with Taiwan has long been a sticking point for Beijing, which is now watching closely whether Trump advances a $14 billion arms deal with the island. Congress approved the deal back in January.

In the Fox News interview, Trump said he was holding that deal “in abeyance” and that it “depends on China … it’s a very good negotiating chip.”

As he flew back to the US, Trump also told reporters aboard Air Force One that he and Xi discussed arms sales to Taiwan “in great detail” and that he would make a decision about arms sales “over the next early short period of time.”

A pause on this deal would mark a significant win for China.

The US is bound by law to provide Taiwan with weapons for its defense. A 1982 US assurance to Taiwan says the US does not have a policy of consulting with Beijing on arms sales. When asked about that stance on Friday, Trump quipped that the 1980s was “a long way.”

In the hours after Trump left Beijing, China too weighed in with its own read on the situation.

“We sensed during the meeting that the US side understands China’s position and attaches importance to China’s concerns, and … does not support or accept Taiwan moving toward independence,” Chinese Foreign Minister Wang Yi told reporters, according to state media.

His statement also made another announcement: confirmation that Xi had accepted Trump’s invitation to visit the US in the fall – opening up the next major touchpoint, potentially, for the two leaders to extend their period of goodwill.