I cannot eat onions. More of an intolerance,for lack of a better word, certainly not an allergy. My nephew has suffered anaphylaxis from not only onions, but cross-contamination from onions. But he can have onion powder. Apparently, whatever individual part of onion he reacts to breaks down with the processing that onion powder goes through. I do not take a chance--if I am feeding him, there is no onion powder, either.
I have no trouble cooking without onions. Often I can skip them or sub fennel or other flavors. But for me cooking without garlic would be harder. Of course, garlic is one if the subs I use for onions.
The bigger problem is that so many foods contain garlic or onions, and judging from my nephew's experiences, not all restaurants realize that onions can be as serious an allergen as peanuts. Even just going to book club, I hate to ask everyone whether what they brought has onions. And it often does. So I just stick to desserts, what I bring, and things that obviously have no onions (mostly chips, popcorn, etc).