• React Hook that updates when the given PixelInfoNotifier's prop changes.

    Type Parameters

    • T extends
          | "systemId"
          | "name"
          | "rssi"
          | "pixelId"
          | "ledCount"
          | "colorway"
          | "dieType"
          | "firmwareDate"
          | "batteryLevel"
          | "isCharging"
          | "rollState"
          | "currentFace"
          | "currentFaceIndex"

    Parameters

    • pixelInfo: undefined | PixelInfoNotifier<PixelInfoNotifierMutableProps, Readonly<{
          batteryLevel: number;
          colorway:
              | "custom"
              | "unknown"
              | "onyxBlack"
              | "hematiteGrey"
              | "midnightGalaxy"
              | "auroraSky"
              | "clear"
              | "whiteAurora";
          currentFace: number;
          currentFaceIndex: number;
          dieType:
              | "unknown"
              | "d4"
              | "d6"
              | "d8"
              | "d10"
              | "d00"
              | "d12"
              | "d20"
              | "d6pipped"
              | "d6fudge";
          firmwareDate: Date;
          isCharging: boolean;
          ledCount: number;
          name: string;
          pixelId: number;
          rollState:
              | "unknown"
              | "rolled"
              | "handling"
              | "rolling"
              | "crooked"
              | "onFace";
          rssi: number;
          systemId: string;
      }>>

      The PixelInfoNotifier for which to watch the prop.

    • prop: T

      The prop to watch.

    Returns PixelInfoNotifierMutableProps[T] | undefined

    The current value of the given prop on the given PixelInfoNotifier.