Skip to content
This repository has been archived by the owner on Aug 14, 2023. It is now read-only.

Latest commit

 

History

History

useMotion

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

useMotion

Demo

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

Example

import React from 'react';
import { useMotion } from 'react-essential-tools';

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

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