I think it’s best to eat before and after. Fuel up on carbs and protein 30-60 minutes before exercise. Have a post exercise recovery meal waiting for you immediately after. Everyone is different, so experiment far in advance of any major event or race to find out which foods work best. I usually have to save the proteins and fats for my recovery meal.