Effector Debounce
https://codesandbox.io/s/effector-throttle-debounce-w32tk
Installation
npm install --save effector effector-debounce # or yarn add effector effector-debounce
Usage
Create event that should be debounced:
; ;
Create debounced event from it:
; ; ;
To test that original event is correctly debounced you can add watcher:
someHappened.watch; debounced1;debounced2;debounced3;debounced4; // someHappened now 4
Also you can use Effect
and Store
as trigger. createDebounce
always returns Event
:
;; ;; ;;
Change name
;; // Now debounced var has `triggerDebounceTick` name
To change name:
;; // Now debounced var has `HelloDebounceTick` name