Example of named effect for debugger (#879)

This commit is contained in:
Alex Barry 2019-09-09 21:00:36 -04:00 committed by Jorge Bucaran
parent 0764036f4e
commit 9a857398aa
1 changed files with 2 additions and 2 deletions

View File

@ -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)