Optical giant resonances in nuclear reactions