Workers produce memory foam for mattresses at a factory in Nantong, China, on Nov. 5, 2018. The trade war is nearing a possible truce, but global companies are nevertheless moving to reduce their dependence on Chinese factories to make the world’s goods. (Gilles Sabrié for The New York Times)