# cwise89/react-detect-offline

Offline and Online components for React

Repository: https://github.com/cwise89/react-detect-offline
Canonical: https://ross.abutalabs.com/products/react-detect-offline
Language: JavaScript
License: MIT
License Family: permissive
Last push: 2022-12-07T01:01:01+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": 3321, "days_push": 1366, "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 1280, forks 96 (observed 2026-08-28T04:04:13.723595+00:00)

## What it is
A small React component library that tracks the browser's online/offline connection state. It ships Online, Offline, and Detector components that conditionally render children based on connectivity, with a configurable polling fallback for browsers with unreliable online events.

## Use cases
- detect if the user is offline in a react app
- show a banner when internet connection is lost
- conditionally render content only when online
- monitor network connectivity changes in react
- display an offline message in a react component
- style the ui differently based on connection status

## When to choose
- You use React and want a tiny, declarative way to render UI based on online/offline state
- You need a render-prop Detector for complex cases like swapping styles on connectivity changes
- You want a polling fallback for browsers where the online event is unreliable

## When to avoid
- Your project is not built with React
- You need network quality metrics such as bandwidth or latency, not just an online/offline flag
- You require a library with frequent recent releases or a hooks-first API

## Facets
- artifact type: library
- maturity: maintenance
- function: ui-components, state-management
- domain: web-development, frontend, networking
- platform: browser
- tags: react, react-components, offline-detection, network-status, connectivity, online-offline, connection-monitor, render-prop

## Member repositories
- cwise89/react-detect-offline (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:13.723595+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-30T05:02:36.264504+00:00, confidence not recorded.
  - readme: https://github.com/cwise89/react-detect-offline (fetched 2026-08-28T04:04:13.723595+00:00, sha a56ac073f20a)
  - registry_npm: https://registry.npmjs.org/react-detect-offline (fetched 2026-08-29T12:13:17.058554+00:00, sha 84e24eace13c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
