The current default implementation of debounce is actually closer to throttle. We plan to transition the current behaviour to throttle, and change the deault behavour of debounce in the next major release.
Until version 0.6.x is released the following will give a deprecation warning:
signal('fieldChanged', [
copy('input:/value', 'state:/form.field'),
debounce(500, [
validateForm
])
]);
To remove the warning but keep the current behaviour, simple add the options which define the current default behaviour:
signal('fieldChanged', [
copy('input:/value', 'state:/form.field'),
debounce(500, [
validateForm
], { immediate: true, throttle: true }) // <- current defaults for version 0.5.x
]);
Even better would be to move to the new throttle()
action factory.
The default behaviour of throttle will become:
signal('fieldChanged', [
copy('input:/value', 'state:/form.field'),
debounce(500, [
validateForm
], { immediate: false, throttle: false })
]);