Add `delay` effect
See original GitHub issueI keep copying+pasting the delay
effect between my projects. Don’t you think it would be a good candidate to be included in redux-saga
?
I have also enhanced the signature of the function to yield to true instead of undefined:
function delay(ms) {
return new Promise(resolve => setTimeout(() => resolve(true), ms))
}
Then you could easily check for timeouts in race
const { timeout, otherCall } = yield race({
timeout: call(delay, 5000),
otherCall: call(asyncFunc, ...)
})
Issue Analytics
- State:
- Created 8 years ago
- Reactions:18
- Comments:20 (13 by maintainers)
Top Results From Across the Web
The Delay Effect: A Powerful Tool For Electronic Music
The delay effect is probably the most famous effect of all. Its echoing result is instantly recognizable and can add depth and emotion...
Read more >4 Basic Types of Delays used on Vocals - Mixing Tips
If you want to check 4 basic types of delays that are used on vocals, follow this article. Adding delay on vocals article...
Read more >How To Use Delay - Mastering The Mix
Delay is a powerful mixing tool for adding width, depth and dimension to your tracks. However, sometimes it can be difficult to dial...
Read more >Using Delay Effects in Music Production - Renegade Producer
The delay effect is created by recording or buffering the signal and then playing back repeats of the signal at later points in...
Read more >Delay Effect - what is it and how does it work - Samplecraze
The length of tape, tape speed and switching the head positions determined the delay time. Additionally, the delayed signal could then be fed...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Anahkiasen I think it’s
import {delay} from 'redux-saga'
.adding a
delay
util function could make sens. But adding a new effect here is irrelevant here since this is just an alias for a call effect. I prefer to keep the core small and focused