If China retaliates – and why wouldn’t it? – there will be substantial self-inflicted collateral damage to the US technology sector.
While there is still a chance, however, slim, of agreeing a mutually acceptable trade deal with the US, China will presumably be wary of allowing any further devaluation.
The US has already opened a rift with its allies by tearing up the nuclear deal and talk of war will only make it harder to build an alliance of like-minded countries to try to curb Iran's behaviour.
The working assumption within the White House appears to be that the US can do far more damage to China than China can do to the US and therefore they can bend China to their will and remove it as a threat to US economic and geopolitical supremacy.