react-bindings
    Preparing search index...

    Function BindingsConsumer

    • A component that is rerendered based on input binding changes.

      A BindingsConsumer must have exactly one function child.

      The general usage pattern is something like:

      <BindingsConsumer bindings={{someBinding, anotherBinding}}>
      {({someBinding, anotherBinding}) => <Typography>{someBinding} - {anotherBinding}</Typography>}
      <BindingsConsumer>

      Type Parameters

      Parameters

      • props: LimiterOptions & {
            areInputValuesEqual?: (a: any, b: any) => boolean;
            bindings?: DependenciesT;
            detectInputChanges?: boolean;
            makeComparableInputValue?: () => any;
        } & { children: BindingsConsumerRenderCallback<DependenciesT> }
        • OptionalareInputValuesEqual?: (a: any, b: any) => boolean

          If specified, overrides the function used to compare input values

          _.isEqual, which can be globally overridden using setAreEqual

        • 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
          

      Returns Element