0.0.5 • Published 3 years ago

@gsimone/memoize-throttle v0.0.5

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

🤸‍♂️ Memoize/Throttle

Throttle a function in the background while returning a memoized value every call.

const myExpensiveCallback = memoizeThrottle(() => {
  return myDiv.getBoundingClientRect().left
}, 160) 

rAFLoop(() => myExpensiveCallback())

When to use

Use when you need to fetch for a value with high frequency but can use stale values - eg. if you are interpolating/animating at lower frequencies.

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago