Before the tariff war kicked in, China did have a massive volume of sales to the US but, to put it into context, this only amounted to 2% of its GDP. That said, the Communist Party would clearly prefer not to be locked in a trade war with the US at a time when it has been struggling to fix its own considerable economic headaches, after years of a real estate crisis, overblown regional debt and persistent youth unemployment.
However, despite this, the government has told its people that it is in a strong position to resist the attacks from the US. It also knows its own tariffs are clearly going to hurt US exporters as well.