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

Function useScannedPixels

  • useScannedPixels(opt?): [ScannedDevice[], ((action: PixelScannerDispatchAction) => void), PixelScannerStatus]
  • React hook that creates PixelScanner to scan for Pixels using Bluetooth. The list is modified on every scan event, whether it is a newly discovered Pixel or an already know one. As such the hosting React component will re-render on every change.

    Parameters

    • Optionalopt: PixelScannerOptions

      Optional arguments, see PixelScannerOptions.

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

    An array with:

    • The list of ScannedPixel. It is updated every time there is a new scan event.
    • A stable reducer like function to dispatch actions to the scanner.
    • The scan status or the last error.
    • Defined in packages/react-native-pixels-connect/src/hooks/useScannedPixels.ts:23

Settings

Member Visibility
GitHubPixels Website
Documentation
  • Loading...

Generated using TypeDoc