Skip to content

0.6.1

Compare
Choose a tag to compare
@okwolf okwolf released this 04 Mar 23:24
· 93 commits to master since this release

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
  }
}

Thanks @rmc for #27!

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.