React Device Detect Versions Save

Detect device, and render view according to detected device type.

v2.2.3

1 year ago

#205

v2.1.2

2 years ago

Fix #168

v2.1.1

2 years ago

Fix #167

v2.0.1

2 years ago

Icludes #163

v2.0.0

2 years ago

Package was completely rewritten. But there is not many breaking changes.

Breaking change:

Views doesn't accept viewClassName prop anymore, use className instead.

New type

New type isEmbedded was added, it returns if device type is embedded.

New hooks

useDeviceData and useDeviceSelectors hooks were introduces.

First returns all device data, second returns all available selectors. Both hooks accept either userAgent as prop, or take it from window.navigator.userAgent.

Enums

BrowserTypes and OsTypes are now exported from the package. They has not very big amount of entries for now, but they will be extended soon.

Utilities updates/additions

Added function getSelectorsByUserAgent which returns all selectors available for given user agent. User agent argument is mandatory.

Now deviceDetect accepts userAgent and returns all available data. Can be used in SSR.

Added function parseUserAgent which returns all available data for given user agent. Useful in SSR. User agent argument is mandatory.

v1.15.0

3 years ago

Upgrade ua-parser-js version #121 fix withOrientationChange typing + expose useMobileOrientation hook #120 Allow React 17 as peerDependency #113

v.1.14.0

3 years ago

Update ua-parser-js

Add isMIUI helper #98 Change isLegacyEdge to be false if isEdgeChromium #111 Make isEdgeChromium work for all operating systems #110

v1.13.1

3 years ago

Add isLegacyEdge, isEdgeChromium, isWindows, isMacOs types.

Updated isEdgeType to detect both edge and edge chromium

Add fix in case of nav.playtform is undefined #86

v.1.12.1

4 years ago

fix isIOS and isMobileSafari on iPads running Safari and iOS #85

v1.12.0

4 years ago
  • Update ua-parser-js
  • Merge fix for ios 13 #81
  • Security fixes