Studying star formation at low and high redshift with integral field spectroscopy