Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 282 Bytes

useMediaDevices.md

File metadata and controls

20 lines (14 loc) · 282 Bytes

useMediaDevices

React sensor hook that tracks connected hardware devices.

Usage

import {useMediaDevices} from 'react-use';

const Demo = () => {
  const state = useMediaDevices();

  return (
    <pre>
      {JSON.stringify(state, null, 2)}
    </pre>
  );
};