Skip to content

Releases: doong-jo/react-device-orientation-hook

Release 1.0.0

26 Jun 12:08
Compare
Choose a tag to compare

First Release

You can use this HOOK as shown below.

import useDeviceOrientation from 'react-device-orientation-hook;

function Component() {
  const { transformStyle, resetPivotOrientation } = useDeviceOrientation();

  return (
    <>
      <div style={transformStyle} onClick={resetPivotOrientation} >
        Hello World!
      </div>
      <p>Touch text and Revise orientation</p>
    </>
  );
}