@posit-dev/shinyreact
    Preparing search index...

    Function useShinyOutputValue

    • Hook to subscribe to a Shiny output value.

      Returns just the current value. Use this when you only need the data — which is most call sites. If you also need the lifecycle status (to drive a skeleton, spinner, or error UI), call useShinyOutputStatus alongside it.

      Type Parameters

      • T

      Parameters

      • outputId: string

        The ID of the Shiny output to subscribe to.

      • defaultValue: T | undefined = undefined

        Optional value returned while the server has not yet delivered the first response.

      • options: { namespace?: string | null } = {}

        Optional configuration object.

        • Optionalnamespace?: string | null

          Module namespace to apply (or null to suppress the surrounding ShinyModuleProvider namespace).

      Returns T | undefined

      The current output value.