All Projects → haldarmahesh → use-mobile-detect-hook

haldarmahesh / use-mobile-detect-hook

Licence: MIT License
React hook to detect the device type

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to use-mobile-detect-hook

preact-urql
Preact bindings for urql
Stars: ✭ 28 (-54.84%)
Mutual labels:  hooks
use-saga-reducer
Use redux-saga without redux
Stars: ✭ 72 (+16.13%)
Mutual labels:  hooks
reactive-hooks
Reactive Hooks Library
Stars: ✭ 29 (-53.23%)
Mutual labels:  hooks
wagmi
React Hooks for Ethereum
Stars: ✭ 1,691 (+2627.42%)
Mutual labels:  hooks
useStateMachine
The <1 kb state machine hook for React
Stars: ✭ 2,231 (+3498.39%)
Mutual labels:  hooks
use-unmount-signal
A React Hook to cancel promises when a component is unmounted
Stars: ✭ 276 (+345.16%)
Mutual labels:  hooks
git-templates
Templates / Hooks for Your Git Repositories
Stars: ✭ 30 (-51.61%)
Mutual labels:  hooks
rn-chat
Chat app made with React Native, NativeBase, Apollo Hooks and Sequelize.
Stars: ✭ 37 (-40.32%)
Mutual labels:  hooks
useAudioPlayer
Custom React hook & context for controlling browser audio
Stars: ✭ 176 (+183.87%)
Mutual labels:  hooks
tiny-react-with-hooks
⚛︎ Fundamental Implementation of React with Hooks & VDOM
Stars: ✭ 20 (-67.74%)
Mutual labels:  hooks
hooks
A DLL that performs IAT hooking
Stars: ✭ 21 (-66.13%)
Mutual labels:  hooks
use-debugger-hooks
A small package of custom React hooks that are useful for debugging changes in React hook dependencies across renders
Stars: ✭ 44 (-29.03%)
Mutual labels:  hooks
use-metamask
a custom React Hook to manage Metamask in Ethereum ĐApp projects
Stars: ✭ 131 (+111.29%)
Mutual labels:  hooks
react-drag
A drag and drop platform based on sortable.js front-end visualization. 一个基于sortable.js的前端可视化搭建的拖拽平台,ui组件采用antd-mobile.通过umi脚手架构建.技术栈采用dva+hooks+umi+antd-mobile+sortable.js+react-color.
Stars: ✭ 51 (-17.74%)
Mutual labels:  hooks
execmon
Advanced process execution monitoring utility for linux (procmon like)
Stars: ✭ 77 (+24.19%)
Mutual labels:  hooks
CJMethodLog
Objective-C 函数日志监听系统,可监听任意类,任意类的任意方法的调用日志。
Stars: ✭ 26 (-58.06%)
Mutual labels:  hooks
react-typescript-hooks-realworld
conduit realworld application with [ React + Typescript + Redux + Hooks ]
Stars: ✭ 20 (-67.74%)
Mutual labels:  hooks
react-awesome-reveal
React components to add reveal animations using the Intersection Observer API and CSS Animations.
Stars: ✭ 564 (+809.68%)
Mutual labels:  hooks
use-window-focus
React Hook to check if window is focused
Stars: ✭ 19 (-69.35%)
Mutual labels:  hooks
reactools
Create React interfaces is easy.
Stars: ✭ 14 (-77.42%)
Mutual labels:  hooks

npm version

use-mobile-detect-hook

React hook to detect the device type. This hook is able to detect mobile, desktop, android or iOS device.

Installing

npm install use-mobile-detect-hook
yarn add use-mobile-detect-hook

Demo

Follow this link to check the demo.

Usage

import useMobileDetect from 'use-mobile-detect-hook';

function MyComponent  = (props) => {
  const detectMobile = useMobileDetect();

  return (
      <div>
        is Mobile: { detectMobile.isMobile() } <br/>
        is Desktop: { detectMobile.isDesktop() } <br/>
        is Android: { detectMobile.isAndroid() } <br/>
        is iOS: { detectMobile.isIos() }
      </div>
  );
};

Contributing

If you have any new suggestions, new features, bug fixes, etc. please contribute by raising pull request on the repository.

If you have any issue with the use-mobile-detect-hook, open an issue on Github.

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].