npm.io
1.0.2 • Published 7 years ago

react-device-detection

Licence
MIT
Version
1.0.2
Deps
0
Size
15 kB
Vulns
0
Weekly
0

React device detection

General HOC that will pass in boolean props such as isMobile or isFirefox for a component to use at its discretion.

Install:

yarn add react-device-detection 

Example

import deviceDetection from 'react-device-detection';

...
deviceDetection('mobile')(withRouter(MobileNav));