An application of the invariance principle to reaction-diffusion equations