Donald Trump has flouted the Chinese government's ban on Twitter by sending a series of tweets to his 42 million followers during a visit to the country.

The US president marked his arrival in Beijing on Wednesday by tweeting: "thank you for the beautiful welcome China!" but the message openly disregards the country's firewall, which blocks its citizens from using the social media site.

Observers have seen Mr Trump's tweets as a mark of showmanship during his visit to the country.

"The president will Tweet whatever he wants," a senior US official told reporters aboard Air Force One shortly before Trump landed in Beijing.

"That's his way of communicating directly with the American people. Why not? So long as he can access his Twitter account because Twitter is banned in China along with Facebook and most of the other social media."