Function useLoadCodeContribution

  • A React Hook that gets a code contribution. It may activate inactive extensions required for the code contribution as a side effect.

    Usually you won’t use useLoadCodeContribution directly in your components. Instead, you provide your own custom Hook for your contribution point identified by contribPointId.

    See also the loadCodeContribution function, which is the non-reactive equivalent of this Hook.

    Important: On the very first render of a component, the function returns undefined. TODO: Find out how we can we avoid this behaviour.

    Type Parameters

    • Value = unknown

      Type of the loaded code contribution value.

    Parameters

    • contribPointId: string

      The contribution point identifier

    • contribId: string

      The code contribution identifier

    Returns CodeContribution<Value> | undefined

    The current state of the code contribution or undefined.

Generated using TypeDoc