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

    Function RealtimePipelineProvider

    • Mount the pipeline store + connection at the React root. Children can subscribe via import("./hooks").usePipelineValue or any of the typed per-slice hooks in the same module.

      The provider:

      1. Lazily builds one PipelineStoreApi per provider instance (stable across re-renders via useRef).
      2. Mounts a single PipelineConnection in useEffect. The connection's destroy() runs on unmount.
      3. Exposes the store via React context for selector hooks.

      If you supply your own store and/or connection, the provider skips the corresponding step — convenient for tests + GreenRoom scenarios where the store is driven by simulated traffic.

      Returns ReactNode

      import { RealtimePipelineProvider, usePipelineCampaigns } from "@playlive/react-pipeline";

      function App() {
      return (
      <RealtimePipelineProvider initialCampaignIDs={["abc-123"]}>
      <Overlay />
      </RealtimePipelineProvider>
      );
      }

      function Overlay() {
      const campaigns = usePipelineCampaigns();
      return <pre>{JSON.stringify(campaigns, null, 2)}</pre>;
      }