Hannah made a vow with God and promised God that she would give her son for God’s service if He answered her prayer for a child (1 Samuel 1:10–11). Hannah’s vow was not a "bargain" or "barter" with God. The principle of a vow to God is, “If God will do A, then I will do B” for God. Other examples of vows are found at Genesis 28:20-22; Leviticus 7:16; Leviticus 22:23; Numbers 21:2; Deuteronomy 12:11; and 2 Samuel 15:8. Ancient Israelites made vows conditional upon God granting their requests. However, vows were often abused. In fact, the Old Testament warns against making vows (see Deuteronomy 23:21-23; Proverbs 7:10-14; Proverbs 20:25; Jeremiah 44:25). Many people in the Bible made vows to God (e.g., 1 Samuel 14:24-28) and did not keep these vows (1 Samuel 19:6). Vows would go unfulfilled and never paid, moving God’s anger. So, the Old Testament states that not making a vow is better than backing out of one (Ecclesiastes 5:3-5). In the New Testament, Jesus warnings us not to make any vows, but simply to keep our word (Matthew 5:33-37; see also James 5:12). Hannah distinguished herself in that she carried out her vow to God (1 Samuel 1:24–28). God keeps His promises, and He expects us to do the same.
God honored Hannah’s prayers and faith. Hannah’s son was named Samuel which mean "heard by God" or "asked of God" because she asked for him from God (1 Samuel 1:20). When God answered Hannah’s prayer, she kept her promise to God and dedicated her son Samuel to God's service. Yet more, Hannah praised and thanked God for answering her prayer for a child. God is worthy of praise.
Hannah’s prayer is a good example to follow: honestly tell God how you really feel and leave your problems with Him. Like Hannah, we should be confident of God's definitive control over the events and circumstances in our lives. God is all-knowing, perfect and in control (1 Samuel 2:4-10). We may also ask God to fulfill the requests and longings of our hearts. God provides for those who genuinely trust in Him. So, ask God first and trust Him to provide! Always remember that God keeps His promises.