launchdarkly-react-client-sdk - v3.9.0
    Preparing search index...

    Function withLDConsumer

    • withLDConsumer is a function which accepts an optional options object and returns a function which accepts your React component. This function returns a HOC with flags and the ldClient instance injected via props.

      Parameters

      • options: ConsumerOptions = ...

        If you need only the ldClient instance and not flags, then set { clientOnly: true } to only pass the ldClient prop to your component. Defaults to { clientOnly: false }.

      Returns <P>(WrappedComponent: ComponentType<P & LDProps>) => (props: P) => Element

      A HOC with flags and the ldClient instance injected via props