# duskload/react-device-detect

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

Repository: https://github.com/duskload/react-device-detect
Canonical: https://ross.abutalabs.com/products/react-device-detect
Language: JavaScript
License: MIT
License Family: permissive
Topics: mobile, device, detect, useragent, javascript, user-agent
Last push: 2024-07-03T00:31:27+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3242, "days_push": 792, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2922, forks 155 (observed 2026-08-28T04:07:30.241179+00:00)

## What it is
A React library that detects device type, browser, and OS via user-agent sniffing and provides components and selectors to conditionally render views per device. It offers view components like BrowserView and MobileView plus boolean selectors such as isMobile and isIE.

## Use cases
- render different components on mobile vs desktop in react
- detect if user is on a tablet or phone
- show a browser-not-supported message for IE users
- conditionally render content based on device type
- detect smart tv or console browsers in a react app
- get browser name and device model from user agent

## When to choose
- you need to detect specific browsers or device categories, not just screen size
- you want ready-made React view components for per-device rendering
- you need SSR-compatible device detection hooks and selectors

## When to avoid
- you only need responsive layouts - use CSS media queries or matchMedia instead
- you need reliable feature detection rather than user-agent sniffing
- user agents may be spoofed or reduced in your target browsers

## Facets
- artifact type: library
- maturity: maintenance
- function: ui-components, state-management
- domain: frontend, web-development, mobile-development
- platform: browser
- tags: react, user-agent-sniffing, device-detection, responsive-rendering, browser-detection, nodejs, web-server

## Member repositories
- duskload/react-device-detect (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:30.241179+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:33:45.914824+00:00, confidence not recorded.
  - readme: https://github.com/duskload/react-device-detect (fetched 2026-08-28T04:07:30.241179+00:00, sha ccd1c9b3ee1e)
  - registry_npm: https://registry.npmjs.org/react-device-detect (fetched 2026-08-29T09:49:19.380292+00:00, sha f884667d8ee3)
- Data as of 2026-08-30T08:39:29.467469+00:00.
