With anti-Chinese sentiment on the rise, crafting rational foreign policy will be increasingly a difficult needle to thread.