next-delay Delay for next. installation npm install -S @jswork/next-delay usage import '@jswork/next-delay'; solution function sleeper(ms) { return function(x) { return new Promise(resolve => setTimeout(() => resolve(x), ms)); }; } resources https://stackoverflow.com/questions/38956121/how-to-add-delay-to-promise-inside-then license Code released under the MIT license.