The last year has been rough for investors in China stocks.

U.S. tariffs against the world's second-biggest economy and the ongoing trade war with China, along with concerns about slowing growth in the Chinese economy, have weighed on Chinese stocks. The Shanghai Composite fell 25% last year on those concerns, and though it's recouped some of those losses this year on earlier hopes for a resolution, the index is still down more than 10% from where it was at the start of 2018.

Despite valid concerns about China's slowing economic growth and a potentially full-blown trade war, the worst mistake long-term investors in China stocks can make at this point is to sell their shares in Chinese companies. Here's why:

American and Chinese cash bills overlapping each other.

Image source: Getty Images.

China is still seeing huge growth

President Trump imposed 10% tariffs on $200 billion worth of Chinese imports last September, and raised that rate to 25% in May, in addition to threatening to levy import taxes on an additional (estimated) $300 billion in Chinese imports.

Nonetheless, China's economy has continued to expand in the face of the new tariffs and the additional threats, and as some American companies have moved production out of China to places like Vietnam, India, and Mexico -- although that shift appears to be at least partly caused by rising labor costs in China.

China's GDP expanded by 6.4% in the first quarter, ahead of estimates of 6.3%, which was faster than almost any other major economy in the world. Meanwhile, China's biggest companies continue to see strong growth.

Alibaba (BABA 2.22%), China's biggest e-commerce company, said revenue jumped 51% in its most recent quarter to $13.9 billion, and gross merchandise volume (GMV) in its China marketplaces, a good proxy for overall retail spending in China, jumped 25% in the year ended March 31 to $853 billion.

Tencent (TCEHY 2.66%), the Chinese tech giant that owns the popular social media app WeChat and has a hand in everything from digital payments to online games, said revenue rose 16% to $12.7 billion in its first quarter.

Baidu (BIDU 0.64%), China's search giant, saw revenue from continuing operations increase 21% in its most recent quarter to $3.6 billion, and JD.com (JD 2.43%), China's biggest direct online retailer, said revenue rose 21% to $18 billion during the same period.

None of those companies look like they're feeling any significant cost from the trade war.

The news changes fast

Guessing what will happen in the U.S.-China trade war has become a fool's errand. Markets have moved back and forth at each new announcement, whether it's from President Trump, one of his deputies, or China, but often one piece of news is reversed as soon as the next week.

Treasury Secretary Steven Mnuchin, for instance, said in early May that the two sides were in the "final laps" of an agreement. However, by the next week, a potential compromise was in tatters as Trump took to Twitter to declare new tariffs against China.

Looking out further, the 2020 election has the potential to replace President Trump and, with it, would likely bring a change to China policy.

Even if the trade war escalates, a rising sense of nationalism in China could fuel a backlash against American brands and lift up Chinese competitors, as the Chinese could start to favor their own companies. We've already seen hints of this with the now-delayed Trump administration ban on American companies working with Huawei. That could lead to China abandoning Apple products in favor of Huawei devices. Similarly, it's easy to imagine consumers forgoing Starbucks for Luckin Coffee, and buying NIO electric cars instead of Tesla EVs.

The Chinese economy is changing

While China's trade relationship with the U.S. may have helped fuel much of its growth over the past 20 years, today China is becoming less dependent on the U.S. The U.S. is still China's biggest trading partner, buying about 19% of its exports, but the Chinese government has focused its attention on building a consumer economy in recent years.

The percentage of its GDP coming from its trade surplus has fallen from 8% in 2008 to 1.3% to 2018, and in the meantime, China has become the world's biggest market for things like cars, luxury goods, and e-commerce, and is poised to top the U.S. in overall retail sales as soon as this year.

China's business leaders have also taken notice of this shift. Alibaba's Executive Vice Chairman Joseph Tsai sought to downplay the trade war threat in Alibaba's recent earnings call, saying that China was already shifting to a consumer economy. He noted that China had lost 14 million manufacturing jobs over the last five years, but gained 70 million service jobs. Overall job growth has continued, he said, and he predicted that the Chinese middle class would double over the next 10 years. Even in a full-blown trade war, China's transition to a middle-class economy and middle-class expansion should continue.

The situation today remains fluid, with Trump and Chinese President Xi Jinping set to continue negotiations at the G20 summit. But while long-term investors shouldn't get their hopes up for an immediate or a lasting compromise, they should hold onto their Chinese stocks as China's economic growth continues to be outstanding and Chinese companies may continue to put up outsize growth.