D.Q.
I agree with Janet J.
She is probably acting out becasue she does not know an alternative way to react. Teach her this other way of dealing with this.
I did this with my duaghter and always encouraged her to use her words when she got frustrated. With this strategy, I beleive I have "headed off" many possible opportunities for a tantrum or hitting or whatever.
I also find that talking to her like an adult does the trick. Let her know that hitting is really bad and it makes mommy sad when he does this. Reinforce this for a few days after the incident so that your child knows it is a big deal. Don't make her feel bad about it, but acknowledge it and ask her what happened when she hit. She got a time out and that was not much fun. Talk! Talk! and Talk about it! That is my advice. Also, be sure to show her the alternative way to deal with it! That is a very impt point!