Chemical reactions and phase transitions