With tariffs and tweets, President Trump eggs on a trade war between China and America. With no trade talks on the horizon, relations are unlikely to improve soon. That seems to be what Trump, a self-styled "fighter," wants.

He is right to see China as a rival. He is also right that Washington needs to take action against China's predatory policies. But the president is woefully wrong in the actions he is taking. Instead of developing a coherent strategy, targeting China’s misdeeds, and mitigating its threat, he’s provoking a broad trade war and simply irritating Beijing with his unfocused tariffs and whiny comments.

Most of Trump’s criticisms of China are justified. It clings to unfair trade practices, it abuses access to foreign technology, and it is doing awful things with the technology it has acquired, both by extortion and outright theft from other countries. But whining on Twitter is not the way to respond. And tariffs will end up hurting consumers and businesses in the U.S.

His goal shouldn’t be to make China poor or to stifle its development, but to push Beijing toward better behavior. The best way to do this is not with blunt tariffs but with targeted sanctions. Companies that misappropriate technology or illegally hand it over to the Chinese military should be prevented from getting their hands on it. The Department of Commerce, to its credit, has taken this approach with great success.

Tweeting Trump says he wants a trade war, and now he's complaining that China is fighting back. His rhetoric isn't putting China under pressure, it's only making them angry and recalcitrant. While armed conflict remains a very remote possibility, there is increasing talk of an economic cold war.

Trump touts “make America great again,” but his Chinese counterpart, Xi Jinping, has a similar slogan buttressed by a similar economic nationalism: “The great rejuvenation of the Chinese nation." Both leaders, determined to look tough, don't want to be seen to back down for fear of losing clout at home.

But cooperation with China, on issues such as technology use, serves American interests. If we take the lead globally and treat China as a valuable sidekick, everyone benefits. Thorny issues requiring cooperation include the use of artificial intelligence in military operations, and new high-tech sonic weapons.

A high-tech arms race may well be inevitable — it always is — and Beijing seems to have a head start, but avoiding the worst of its consequences with a negotiated agreement is a laudable and achievable goal. Targeted sanctions, technology export controls, and cooperation can do much toward reaching it.

Blanket economy-wide tariffs and nasty tweets work in the opposite direction.

Washington is gripped by daily drama, but, like compound interest, trade hostilities work nights and Sundays whether or not the political class pays attention to them. Trade war has long-term consequences dividing Beijing and Washington. Trump can win on this issue, but not by playing his hand the way he is now.