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

    Function useOnScheduleUpdate

    • Subscribe to full-schedule updates and invoke handler for every new or replaced entry in store.schedules.

      Mirrors useOnLeaderboardExclusionsChange / useOnLeaderboardEntriesChange exactly: the handler is stashed in a ref so this hook subscribes exactly once (idempotent across re-renders). The optional campaignIDs filter is compared each fire — empty / undefined means "all campaigns".

      Fires on the leading edge of a change: schedules already present on the store when the hook mounts are treated as baseline and do NOT fire the handler. Every subsequent updateSchedule push does. Reference identity of the per-campaign array is guaranteed fresh by the mutator (_updateScheduleForCampaign in @playlive/realtime-pipeline) so !== is enough.

      Soft-fails when no <RealtimePipelineProvider> is mounted — same convention as the other change-observer hooks in this module.

      Parameters

      • handler: (payload: { campaignID: string; schedule: ScheduleTransitionBlock[] }) => void
      • Optionaloptions: { campaignIDs?: readonly string[] }

      Returns void

      useOnScheduleUpdate(({ campaignID }) => {
      queryClient.invalidateQueries({
      queryKey: ["schedule", "tiltify", campaignID],
      });
      }, { campaignIDs: [campaignID] });