Add a generic hook that wraps the lodash.throttle function (or our own), putting a callback into a ref and returning its current value.
Stories may be similar to the useDeepCompareEffect story, with a throttled API call. We may want to consider reusing the component completely, establishing a new pattern for story components that are used for multiple hooks.
When created, also use it in the API story for useDeepCompareEffect.
Add a generic hook that wraps the
lodash.throttle
function (or our own), putting a callback into a ref and returning its current value. Stories may be similar to theuseDeepCompareEffect
story, with a throttled API call. We may want to consider reusing the component completely, establishing a new pattern for story components that are used for multiple hooks.When created, also use it in the API story for
useDeepCompareEffect
.