The 'correct' way to hold the pencil is with the little and ring fingers crooked in and out of the way, the middle finger curled in, with the pencil resting on it, and then the index finger and thumb either side of the pencil.
It is the index finger that does all the fine movements to form the letter shapes, and the whole hand moves along as the letters are formed.
When you look down at the point of the pencil, the thumb, index finger and middle finger should form a triangle round the pencil. The whole hand should be so relaxed as you write that it should be possible for someone to come along and pull the pencil out easily.
All of the above is 'ideal', and if a child gets into these habits at first, then it will set them up for being able to write in a neat, consistant joined-up style in the future, especially when using a fountain pen. It will also enable the child to write for extended periods without developing hand cramps or the writing dejenerating.
Byt the time our 5 year olds are adults, handwriting as an art will have become archaic, and they will need their keyboard skills much more, so it could be argued that, so long as she is comfortable holding the pencil 'her way', and so long as she can correctly form the letters, she is doing well enough.