A war between China and the US would be extremely one-sided in favor of the states.
Militarily - I'm not a chest beating American, but no other military in the world has the combat experience, weapons tech, power projection, and resupply capability that the US has. The Chinese have submarines, but let's be fair here, maritime warfare is a longtime American specialty, and the US Navy probably has the location of every Chinese submarine pinned down. We've been playing these submarine games with the Soviets since the 1950's, and we have half a century of experience to fall back on tracking them down.
Economy - The US has the natural resources, economic infrastructure, and factory output to produce everything the Chinese make for us. If anything, a war between the two superpowers would result in a lot of factory jobs returning to the US ala WW2 style. Even rare earth deposits can be mined in the US. The only reason we buy it from China is because the mining operations are already setup there, but they can be setup here too.
Infrastructure - Important factor here, but the Chinese infrastructure is open for demolition since the US is the only warring power here who can project any sizable form of military power. Destroying infrastructure is also a specialty of the US, and could potentially lead to a tremendous amount of displacement, starvation, and economic collapse since military targets are similar to civilian targets (roads, bridges, power generation, food storage, etc). This latter part is actually the part I fear most, as Chinese infrastructure is very fragile in terms of food supply.
With that said, I hope a war between us never, ever occurs.