Example of named effect for debugger (#879)
This commit is contained in:
parent
0764036f4e
commit
9a857398aa
|
@ -4,13 +4,13 @@ var timeFx = function(fx) {
|
|||
}
|
||||
}
|
||||
|
||||
export var timeout = timeFx(function(dispatch, props) {
|
||||
export var timeout = timeFx(function timeout(dispatch, props) {
|
||||
setTimeout(function() {
|
||||
dispatch(props.action)
|
||||
}, props.delay)
|
||||
})
|
||||
|
||||
export var interval = timeFx(function(dispatch, props) {
|
||||
export var interval = timeFx(function interval(dispatch, props) {
|
||||
var id = setInterval(function() {
|
||||
dispatch(props.action, Date.now())
|
||||
}, props.delay)
|
||||
|
|
Loading…
Reference in New Issue