as melee, play around her cds, if her W is out for waveclear or she just proced her passive on minions, you have a short window to trade, post 6 it's mostly about avoiding Q and getting a short trade while it's on cd.
As ranged, its easier, it's just avoiding her Q.
On longranged champs that can act out of her Q range, or atleast at maxrange, thats rather easy.
Playing her a bit yourself if she's free to play certainly helps alot, as you will get a hang on her Q-curve, which makes dodgeing it far easier.
Any instant cc also helps, a good part off her damage comes from the passive, so if you can prevent her from getting thos AAs of, it'S pretty huge.
You shiould also not try to 1v1 her and keep vision, if she catches you alone, your done, she's a assasin after all.
but in teamfights, good positioning and cc shut her down pretty well.
If her Q misses at the beginning of the teamfight, you have atleast 3.6 sec without fear, enough time for your frontline to nail her down(she needs to get pretty close if she trys to reach a well poasitioned backline with Q) and for you to blow her up, she's not that tanky outside of 1v1, she will melt rather fast if focused by multiple members.
She also has no escape and is all aoe and melee, so she will usually push the wave, beeing in a easy position to gank for your jungler.
It's prettymuch like vs any assasin: don't get cought alone, ward your flanks, position in a way that forces them to go through your frontline in order to reach you.
though i do agree that this isn't as easy in soloQ, especially in lower elos, as you requier your team to beat her.
longranged mages, especially if the have either instant cc or defensive mechanisms are your best choic if you can't rely on your team.
Also, gettign some early MR to surive her level 6 all in certainly helps to atleast not feed her.
lateron a banshies can help alot.