What you eat during races all depends on a) the duration of the race and b) your personal preferences. The golden rule of race food is to pack food you like, can get down and keep down; and avoid too many sweeties and sweetened foods.
On a sprint race, which is usually 25-35km and will take you 2-4hrs to complete, bars and gels will see you through. A banana with your race stuff at the central transition will go down well too. A short course race of 50-75km will take the bulk of the day and it’s a good idea to bring in some real food like sandwiches and boiled baby potatoes with a sprinkle of salt – the latter are a personal favourite.
When it comes to hydration, always keep water in your reservoir and put your carbohydrate drink in your bottle. Sipping on sweet drinks for endless hours not only rots your teeth (over time – build up of carbonic acid) but will make you feel nauseous. And the problem is that ones the sweetness starts getting to you, you stop drinking and that creates its own problems.
Once races start going into 24hrs it is nice to have at least one decent meal, in addition to sandwiches and munchie bag containing dried fruit, nuts, seed bars, salty crackers, crisps and other palatable treats. Races over 24hrs usually have support crew – they’ll provide the meal.