Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "throttledComputed"

Index

Functions

Functions

throttledComputed

  • throttledComputed<T>(compute: () => T, delay: number, name?: undefined | string): { get: any; refresh: any }
  • Like computed, except that after creation, subsequent re-evaluations are throttled to occur at the specified minimum interval.

    Type parameters

    • T

    Parameters

    • compute: () => T

      The function to evaluate in reaction

        • (): T
        • Returns T

    • delay: number

      The minimum delay between evaluations

    • Optional name: undefined | string

      (optional) For MobX debug purposes

    Returns { get: any; refresh: any }

    • get: function
      • get(): NonNullable<T>
      • Returns NonNullable<T>

    • refresh: function
      • refresh(): void
      • Returns void

Generated using TypeDoc