useMotionReact sensor hook that uses device's acceleration sensor to track its motions.
import {useMotion} from 'react-use';
const Demo = () => {
const state = useMotion();
return (
<pre>
{JSON.stringify(state, null, 2)}
</pre>
);
};
// TODO: implement useMotion function notImplemented(..._args: any[]): any { throw new Error('Not implemented'); } export default notImplemented; export const useMotion = notImplemented;
Tests