# ismobilehook

> a function that returns whether device is mobile or not

Latest version **1.4.0** (published 2022-09-22) · ISC license · 0 weekly downloads

## Install

```sh
npm install ismobilehook
pnpm add ismobilehook
yarn add ismobilehook
bun add ismobilehook
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.4.0 |
| Published | 2022-09-22 |
| First published | 2022-04-14 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 191.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | purplevarun |
| Maintainers | purplevarun |
| Keywords | ismobile, hook, ismobilehook |

## Links

- npm: https://www.npmjs.com/package/ismobilehook
- Repository: https://github.com/purplevarun/isMobileHook
- Homepage: https://github.com/purplevarun/isMobileHook#readme
- Issues: https://github.com/purplevarun/isMobileHook/issues
- npm.io page: https://npm.io/package/ismobilehook

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.4.0 (latest) — 2022-09-22
- 1.3.3 — 2022-08-15
- 1.3.2 — 2022-05-06
- 1.3.1 — 2022-05-01
- 1.3.0 — 2022-04-28
- 1.2.0 — 2022-04-16
- 1.1.1 — 2022-04-14
- 1.1.0 — 2022-04-14
- 1.0.1 — 2022-04-14
- 1.0.0 — 2022-04-14

## README

[![version](https://img.shields.io/npm/v/ismobilehook.svg)](https://www.npmjs.com/package/ismobilehook)
[![minified size](https://img.shields.io/bundlephobia/min/ismobilehook.svg)](https://www.npmjs.com/package/ismobilehook)
[![minzipped size](https://img.shields.io/bundlephobia/minzip/ismobilehook.svg)](https://www.npmjs.com/package/ismobilehook)
[![downloads](https://img.shields.io/npm/dt/ismobilehook.svg)](https://www.npmjs.com/package/ismobilehook)

# Demo

<img src="https://github.com/purplevarun/isMobileHook/blob/main/assets/demo.gif?raw=true" alt="Demo Gif (visit GH page if not rendered)"/>

# Installation

## For NPM

        npm i ismobilehook

## For Yarn

        yarn add ismobilehook

# Usage

        import React from "react";
        // importing the function
        import { isMobile } from "ismobilehook";

        const App = () => {
            return (
                <h1>
                    // calling the function
                    {isMobile() ? "Mobile" : "Desktop"} // returns a boolean value
                </h1>
            )
        }
        export default App;

### Author - Varun Kedia (github.com/purplevarun)

---
_Source: https://npm.io/package/ismobilehook · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
