An open API service indexing awesome lists of open source software.

https://github.com/bsonntag/react-device-orientation

A react wrapper for device orientation events.
https://github.com/bsonntag/react-device-orientation

component device-orientation react

Last synced: about 1 year ago
JSON representation

A react wrapper for device orientation events.

Awesome Lists containing this project

README

          

# react-device-orientation

> A react wrapper for device orientation events.

## Installation

Using npm:

```sh
$ npm install --save react-device-orientation
```

Using yarn:

```sh
$ yarn add react-device-orientation
```

## Example

```js
import DeviceOrientation from 'react-device-orientation';
import React from 'react';

const App = () => (

{({ absolute, alpha, beta, gamma }) => (


{`Absolute: ${absolute}`}
{`Alpha: ${alpha}`}
{`Beta: ${beta}`}
{`Gamma: ${gamma}`}

)}

);
```

## Contributing

Please feel free to submit any issues or pull requests.

## License

MIT