Whosoever desires the life of the world and its glitter, to them We shall pay in full (the wages of) their deeds therein, and they will have no diminution therein. They are those for whom there is nothing in the Hereafter but Fire, and vain are the deeds they did therein. And of no effect is that which they used to do.
Al-Awfi reported that Ibn Abbas said concerning this verse,
"Verily those who show off, will be given their reward for their good deeds in this life. This will be so that they are not wronged, even the amount equivalent to the size of the speck on a date-stone."
Ibn Abbas continued saying,
"Therefore, whoever does a good deed seeking to acquire worldly gain - like fasting, prayer, or standing for prayer at night - and he does so in order to acquire worldly benefit, then Allah says, `Give him the reward of that which he sought in the worldly life,' and his deed that he did is wasted because he was only seeking the life of this world. In the Hereafter he will be of the losers."
A similar narration has been reported from Mujahid, Ad-Dahhak and many others.
Anas bin Malik and Al-Hasan both said,
"This verse was revealed concerning the Jews and the Christians."
Mujahid and others said,
"This verse was revealed concerning the people who perform deeds to be seen."
Qatadah said,
"Whoever's concern, intention and goal is this worldly life, then Allah will reward him for his good deeds in this life. Then, when reaches the next life, he will not have any good deeds that will be rewarded. However, concerning the believer, he will be rewarded for his good deeds in this life and in the Hereafter as well."
Allah, the Exalted, says,
مَّن كَانَ يُرِيدُ الْعَـجِلَةَ عَجَّلْنَا لَهُ فِيهَا مَا نَشَأءُ لِمَن نُّرِيدُ ثُمَّ جَعَلْنَا لَهُ جَهَنَّمَ يَصْلَـهَا مَذْمُومًا مَّدْحُورًا
وَمَنْ أَرَادَ الاٌّخِرَةَ وَسَعَى لَهَا سَعْيَهَا وَهُوَ مُوْمِنٌ فَأُولَـيِكَ كَانَ سَعْيُهُم مَّشْكُورًا
كُلًّ نُّمِدُّ هَـوُلاءِ وَهَـوُلاءِ مِنْ عَطَأءِ رَبِّكَ وَمَا كَانَ عَطَأءُ رَبِّكَ مَحْظُورًا
انظُرْ كَيْفَ فَضَّلْنَا بَعْضَهُمْ عَلَى بَعْضٍ وَلَلٌّخِرَةُ أَكْبَرُ دَرَجَـتٍ وَأَكْبَرُ تَفْضِيلً
Whoever desires the quick-passing (transitory enjoyment of this world), We readily grant him what We will for whom We like. Then, afterwards, We have appointed for him Hell; he will burn therein disgraced and rejected.
And whoever desires the Hereafter and strives for it, with the necessary effort due for it while he is a believer - then such are the ones whose striving shall be appreciated.
On each - these as well as those - We bestow from the bounties of your Lord. And the bounties of your Lord can never be forbidden. See how We prefer one above another, and verily, the Hereafter will be greater in degrees and greater in intricacy. (17;18-21)
Allah, the Exalted, says,
مَن كَانَ يُرِيدُ حَرْثَ الاٌّخِرَةِ نَزِدْ لَهُ فِى حَرْثِهِ وَمَن كَانَ يُرِيدُ حَرْثَ الدُّنْيَا نُوْتِهِ مِنْهَا وَمَا لَهُ فِى الاٌّخِرَةِ مِن نَّصِيبٍ
Whosoever desires the reward of the Hereafter, We give him increase in his reward, and whosoever desires the reward of this world, We give him thereof, and he has no portion in the Hereafter. (42;20