debounce<Value>(ms: number, thunk: (() => Value)): undefined | Value
This is not a core part of ember-resources, but is an example utility to demonstrate a concept when authoring your own resources. However, this utility is still under the broader library's SemVer policy.
A consuming app will not pay for the bytes of this utility unless imported.
A utility for debouncing high-frequency updates.
The returned value will only be updated every ms and is
initially undefined.
This can be useful when a user's typing is updating a tracked
property and you want to derive data less frequently than on
each keystroke.
Note that this utility requires the @use decorator
(debounce could be implemented without the need for the @use decorator
but the current implementation is 8 lines)
This is not a core part of ember-resources, but is an example utility to demonstrate a concept when authoring your own resources. However, this utility is still under the broader library's SemVer policy.
A consuming app will not pay for the bytes of this utility unless imported.
A utility for debouncing high-frequency updates. The returned value will only be updated every
ms
and is initially undefined.This can be useful when a user's typing is updating a tracked property and you want to derive data less frequently than on each keystroke.
Note that this utility requires the
@use
decorator (debounce could be implemented without the need for the@use
decorator but the current implementation is 8 lines)Example
Example
This could be further composed with RemoteData