0.1.23 • Published 2 years ago
react-mobile-detect v0.1.23
react-mobile-detect
mobile detect device for react component implement from react-device-detect for my own work
Installation
To install, you can use npm or yarn:
npm i react-mobile-detect
or
yarn add react-mobile-detect
Usage
import {
BrowserView, // Modify this
MobileView, // Modify this
DetectMobileContextProvider
} from "react-mobile-detect";
<BrowserView/>
<MobileView/>
<DetectMobileContextProvider><App/></DetectMobileContextProvider>
const { isMobile } = useMobileDetect();
for Next.js
import dynamic from 'next/dynamic'
const BrowserView = dynamic(() => import('~/components/BrowserView'), { ssr: false })
const MobileView = dynamic(() => import('~/components/MobileView'), { ssr: false })
Run
1. git clone https://github.com/zeing/react-mobile-detect.git
2. yarn
3. yarn start
0.1.20
2 years ago
0.1.21
2 years ago
0.1.10
2 years ago
0.1.22
2 years ago
0.1.11
2 years ago
0.1.23
2 years ago
0.1.12
2 years ago
0.1.13
2 years ago
0.1.14
2 years ago
0.1.8
2 years ago
0.1.7
2 years ago
0.1.9
2 years ago
0.1.6
2 years ago
0.1.5
2 years ago
0.1.4
3 years ago
0.1.3
3 years ago
0.1.2
3 years ago
0.1.1
3 years ago
0.1.0
3 years ago