Skip to content

watchWithFilter

Category
Last Changed
8月1日16时40分

watch with additional EventFilter control.

Usage

Similar to watch, but offering an extra option eventFilter which will be applied to the callback function.

ts
import { debounceFilter, watchWithFilter } from 'conuse-core'

watchWithFilter(
  source,
  () => { console.log('changed!') }, // callback will be called in 500ms debounced manner
  {
    eventFilter: debounceFilter(500), // throttledFilter, pausableFilter or custom filters
  },
)

Source

SourceDocs

Changelog

No recent changes

Released under the MIT License.