Function UpdateFrequency

  • 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.

    Utility that will report the frequency of updates to tracked data.

    import { UpdateFrequency } from 'ember-resources/util/fps';

    export default class Demo extends Component {
    @tracked someProp;

    @use updateFrequency = UpdateFrequency(() => this.someProp);

    <template>
    {{this.updateFrequency}}
    </template>
    }

    NOTE: the function passed to UpdateFrequency may not set tracked data.

    Parameters

    • Rest ...args: [ofWhat: (() => unknown), updateInterval: any]

    Returns number

Generated using TypeDoc