0.6.1
What's new?
Say hello to two new fx for debounce
and throttle
! See the docs for more details, but here are a couple of brief examples:
const actions = {
waitForLastInput: input => debounce(
500,
"search",
{ query: input }
),
search: data => {
/*
This action will run after waiting
for 500ms since the last call
*/
}
}
const actions = {
doExpensiveAction: param => throttle(
500,
"calculate",
{ foo: param }
),
calculate: data => {
// This action will only run once per 500ms
}
}
Bug fixes
Empty arrays are now valid no-op fx instead of throwing an error. This is useful when using fxIf
if all of the conditionals are falsy. Fixed in #28.