Skip to content

Latest commit

 

History

History
20 lines (14 loc) · 285 Bytes

useMotion.md

File metadata and controls

20 lines (14 loc) · 285 Bytes

useMotion

React sensor hook that uses device's acceleration sensor to track its motions.

Usage

import {useMotion} from 'react-use';

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

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