All Projects → rehooks → device-orientation

rehooks / device-orientation

Licence: MIT license
React hook for the Device Orientation API

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to device-orientation

react-facade
Experimental dependency injection for React hooks
Stars: ✭ 95 (+313.04%)
Mutual labels:  react-hooks
flutter use
Play Flutter Hooks.
Stars: ✭ 150 (+552.17%)
Mutual labels:  react-hooks
Forum-App-React-Frontend
This is the React client that consumes the API built here: https://github.com/victorsteven/Forum-App-Go-Backend
Stars: ✭ 39 (+69.57%)
Mutual labels:  react-hooks
fetchye
✨ If you know how to use Fetch, you know how to use Fetchye [fetch-yae]. Simple React Hooks, Centralized Cache, Infinitely Extensible.
Stars: ✭ 36 (+56.52%)
Mutual labels:  react-hooks
use-navigator-online
⚛️ React Hooks to detect when your browser is online/offline.
Stars: ✭ 23 (+0%)
Mutual labels:  react-hooks
hodux
🚀Simple reactive React Hooks state management.
Stars: ✭ 29 (+26.09%)
Mutual labels:  react-hooks
react-immer-hooks
Easy immutability in React Hooks with Immer.
Stars: ✭ 45 (+95.65%)
Mutual labels:  react-hooks
react-use-hubspot-form
Embed HubSpot forms into your React components using hooks! Works with Create React App, Gatsby and other platforms.
Stars: ✭ 41 (+78.26%)
Mutual labels:  react-hooks
typescript-react-boilerplate
👻 Minimal example for React with TypeScript.
Stars: ✭ 17 (-26.09%)
Mutual labels:  react-hooks
react-kanban-board
kanban board app with react hooks and ant design ui
Stars: ✭ 15 (-34.78%)
Mutual labels:  react-hooks
eslint-config-ns
ESLint config ready to be used in multiple projects. Based on Airbnb's code style with prettier, jest and react support.
Stars: ✭ 27 (+17.39%)
Mutual labels:  react-hooks
react-stripe-script-loader
A React Component that loads Stripe script if necessary and shows React Stripe Elements
Stars: ✭ 22 (-4.35%)
Mutual labels:  react-hooks
awesome-web-react
🚀 Awesome Web Based React 🚀 Develop online with React!
Stars: ✭ 31 (+34.78%)
Mutual labels:  react-hooks
use-double-click
React hook for combining double-click function into click event, as well as repeatable double-click
Stars: ✭ 17 (-26.09%)
Mutual labels:  react-hooks
web
React hooks done right, for browser and SSR.
Stars: ✭ 940 (+3986.96%)
Mutual labels:  react-hooks
react-use-countdown
React hook for countdown state.
Stars: ✭ 19 (-17.39%)
Mutual labels:  react-hooks
covid-19-stats
Get the latest COVID-19 statistics by country
Stars: ✭ 41 (+78.26%)
Mutual labels:  react-hooks
next-qrcode
React hooks for generating QRCode for your next React apps.
Stars: ✭ 87 (+278.26%)
Mutual labels:  react-hooks
react-stateful
A simple implementation of React-State-Hook and React-Effect-Hook to show how React-Hooks work
Stars: ✭ 34 (+47.83%)
Mutual labels:  react-hooks
promotion-web
基于React: v18.x.x/Webpack: v5.x.x/React Router v6.x.x/ Antd: v5..x.x/Fetch Api/ Typescript: v4.x.x 等最新版本进行构建...
Stars: ✭ 374 (+1526.09%)
Mutual labels:  react-hooks

@rehooks/device-orientation

React hook for the Device Orientation API

Note: This is using the new React Hooks API Proposal which is subject to change until React 16.7 final.

You'll need to install react, react-dom, etc at ^16.7.0-alpha.0

Install

yarn add @rehooks/device-orientation

Usage

import useDeviceOrientation from '@rehooks/device-orientation';

function MyComponent() {
  let value = useDeviceOrientation();
  return (
    <div>
      <p>Absolute: {value.absolute}</p>
      <p>Alpha: {value.alpha}</p>
      <p>Beta: {value.beta}</p>
      <p>Gamma: {value.gamma}</p>
    </div>
  );
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].