Type Alias BindingsConsumerProps<DependenciesT>

BindingsConsumerProps<DependenciesT>: LimiterOptions & {
    areInputValuesEqual?: ((a: any, b: any) => boolean);
    bindings?: DependenciesT;
    detectInputChanges?: boolean;
    makeComparableInputValue?: (() => any);
}

Type Parameters

Type declaration

  • OptionalareInputValuesEqual?: ((a: any, b: any) => boolean)

    If specified, overrides the function used to compare input values

    _.isEqual, which can be globally overridden using setAreEqual

      • (a, b): boolean
      • Parameters

        • a: any
        • b: any

        Returns boolean

  • Optionalbindings?: DependenciesT

    Bindings that cause the consumer to rerender. Undefined values are ignored

  • OptionaldetectInputChanges?: boolean
    • If trueareInputValuesEqual is used to compare the old and new results of makeComparableInputValue when any of the input bindings are changed. If the values are equal, the transformer won't be run. If they're unequal, the transformer will be run.
    • If false – old and new values aren't compared and the transformer will always be run any time the bindings change.

    false

  • OptionalmakeComparableInputValue?: (() => any)

    By default, when detectInputChanges is true, the input is compared using all specified bindings. This behavior can be overridden by providing this function to generate a value that can be compared instead. The generated value will be remembered until the next comparison is needed. Comparisons are performed using areInputValuesEqual

    A function that returns the values of all input bindings
    
      • (): any
      • Returns any