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

v4.1.0 on 8/1/2025
bc8f2 - feat: add useStorage

Released under the MIT License.