Effector Throttle
https://codesandbox.io/s/effector-throttle-debounce-w32tk
Installation
npm install --save effector effector-throttle # or yarn add effector effector-throttle
Usage
Create event that should be throttled:
; ;
Create throttled event from it:
; ; ;
To test that original event is correctly throttled you can add watcher:
someHappened.watch; throttled1;throttled2;throttled3;throttled4;
Also you can use Effect
and Store
as trigger. createThrottle
always returns Event
:
;; ;; ;;
Change name
;; // Now throttled var has `triggerThrottleTick` name
To change name:
;; // Now throttled var has `HelloThrottleTick` name