GitHubPixels Website
  • Preparing search index...
  • The search index is not available
Documentation
  • Documentation
  • @systemic-games/react-native-pixels-connect
  • useScannedPixelNotifiers

Function useScannedPixelNotifiers

  • useScannedPixelNotifiers(opt?): [ScannedDeviceNotifier[], ((action: PixelScannerDispatchAction) => void), PixelScannerStatus]
  • React hook that creates PixelScanner to scan for Pixels using Bluetooth. Use this hook if you don't want the hosting React component to re-render every time an already scanned Pixel in the returned list of ScannedDeviceNotifier gets updated.

    Parameters

    • Optionalopt: PixelScannerOptions

      Optional arguments, see PixelScannerOptions.

    Returns [ScannedDeviceNotifier[], ((action: PixelScannerDispatchAction) => void), PixelScannerStatus]

    An array with:

    • The list of ScannedDeviceNotifier. The list itself is not modified when existing items are updated.
    • A stable reducer like function to dispatch actions to the scanner.
    • The scan status or the last error.

    Remarks

    ScannedDeviceNotifier instances are kept globally, for a given Pixel the same instance is returned and updated by all scanners.

    • Defined in packages/react-native-pixels-connect/src/hooks/useScannedPixelNotifiers.ts:48

Settings

Member Visibility
GitHubPixels Website
Documentation
  • Loading...

Generated using TypeDoc