@playlive/react-pipeline
    Preparing search index...

    Function usePipelineValue

    • Subscribe to a slice of the pipeline store. Only re-renders when the selected value changes (Zustand's default Object.is equality).

      Throws if no import("../provider").RealtimePipelineProvider is mounted above the call site.

      Custom equality semantics (shallow, deep, etc.) aren't accepted directly because Zustand v5 dropped the third arg on useStore to keep the package free of the use-sync-external-store shim peer. If you need shallow equality, wrap your selector with useShallow from zustand/shallow (a zero-extra-dep helper):

      Type Parameters

      • T

        Selected slice type.

      Parameters

      • selector: (state: PipelineStore) => T

        Pure selector over PipelineStore.

      Returns T

      import { useShallow } from "zustand/shallow";
      import { usePipelineValue } from "@playlive/react-pipeline";

      const { connected, connecting } = usePipelineValue(
      useShallow((s) => ({ connected: s.connected, connecting: s.connecting })),
      );
      import { usePipelineValue } from "@playlive/react-pipeline";
      const donationTrains = usePipelineValue((s) => s.donationTrains);