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

https://github.com/max-programming/use-os

Parses browser user-agent strings for React
https://github.com/max-programming/use-os

Last synced: 3 months ago
JSON representation

Parses browser user-agent strings for React

Awesome Lists containing this project

README

        


:package: use-os

:package: use-os


Parses browser user-agent strings for React

Did you like the project? Please, considerate being a supporter and receive exclusive gifts!

## Installation

> Clone this repository: `git clone https://github.com/hebertcisco/use-os`

### Open the directory and install the dependencies

```bash
cd use-os
npm install
```

## Using

```js
import useOs from "use-os";
```

In react component:

```js
export default function HomePage() {
const os = useOs();

return (


{os === "windows" ? (
<>
Windows (.exe)
>
) : (
<>>
)}

);
}
```