Having children and raising them isn't easy. They require you to be patient, kind, persistent, consistent, trusting, guiding and so much more. These are human qualities that every individual should have in all their everyday interactions with others. In fact, Islam places a high value on these characteristics. You deal with all living things in the best of manners and your reward is immense.
Abu Darda reported that Prophet Muhammad (peace be upon him) said, “Nothing is weightier on the Scale of Deeds than one’s good manners.”(Al-Bukhari)
When you have a child, situations will require you to put into practice these best of human qualities because children need compassion and gentleness to grow and be nurtured. Anything raised on harshness and unkindness will have a stunted and debilitating growth and can cause psychological problems in later life.
Parents need to take a personality inventory to see if they are up to the standard that Islam requires them to be. There's always room and opportunities for improvement. You might think that you have patience but when you have a screaming child, will that patience hold? Or you might think that there is no way that you can have the patience to deal with this situation so you give up and not try. But remember that Allah does not burden a soul with more than it can bear. He knows that you can do it. This is why He gave it to you. So you must put in the effort. Allah says:
Allah does not charge a soul except [with that within] its capacity. It will have [the consequence of] what [good] it has gained, and it will bear [the consequence of] what [evil] it has earned... (Quran, al Baqarah 2:286)
In both cases though, it may be that it will require you to do some personal development. It is for this reason that Allah sends you your child with his or her personality to test you and allow your personality to develop.
Prophet Muhammad (peace be upon him) said, “Whoever Allah wants good for him, He puts them to test. He puts them through difficulties. Like a diamond or some metal that has to be burnt and then that which is bad from it is removed so that you have that which is the pure diamond or the pure gold or whatever. Put them to tests, trials and difficulties.” (Al-Bukhari and Muslim)
You can be a willing student of your child or you can resist. If you resist then you remain stagnant and you don't grow into the best version of yourself that Allah allows you to be. You must be the one willing to learn and change. Allah says:
That is because Allah would not change a favour which He had bestowed upon a people until they change what is within themselves. And indeed, Allah is Hearing and Knowing. (Quran, al Anfal 8:53)
The question now is how do you learn from your children?
First, you must remember that Allah places people, situations and events in your path for a reason. They're for you to better yourself. Nothing happens without reason. Ask yourself: Why is this situation happening? What do I need to purify within me?
Secondly, change the way you look at things. How do you normally interpret the situation with your child or his/her reactions to you? Do you see the positive, negative or neutrality in the situation?
For example, your 2 year old child throws a tantrum. Which would be your immediately thought?
a) Why is he doing this to me? He's embarrassing me! He always does this when we're out. I can't go anywhere! Quick, how do I get him to be quiet?
b) What can I do? He's just tired.
c) He's trying to tell me something. Let me find out what it is.
The first thoughts are of impatience, exasperation and narcissism. It focuses on you, the parent. The second is neutral: you can't do anything about it. It's just a fact of life. The third focuses on your child and his needs. It requires a lot of patience to sort out what your child really wants underneath the tears.
If you're willing to change your thoughts to c) then it requires you to become patient, have empathy and persistent. If you're quick to jump to perspective a) and b) then there's something in your personal development that needs attention.