
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@types/react-detect-offline
Advanced tools
TypeScript definitions for react-detect-offline
npm install --save @types/react-detect-offline
This package contains type definitions for react-detect-offline (https://github.com/cwise89/react-detect-offline#readme).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-detect-offline.
import { JSX } from "react";
export interface PollingConfig {
/**
* URL to pool for connection status
*/
url: string;
/**
* Force polling on or off.
* Polling is only used as a fallback for browsers that don't support the `"online"` event.
* Currently these are Chrome on Windows, Firefox on Windows, and Chrome on Linux.
*/
enabled: boolean;
/**
* How often (in ms) to poll
*/
interval: number;
/**
* How long (in ms) before timeout
*/
timeout: number;
}
export interface BaseProps {
children?: React.ReactNode | undefined;
/**
* Called when connection changes
*/
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type
onChange?: ((online: boolean) => void | undefined) | undefined;
wrapperType?: string | undefined;
/**
* Config for polling fallback
*/
polling?: boolean | Partial<Omit<PollingConfig, "enabled">> | undefined;
}
export interface BaseState {
online: boolean;
}
export const defaultProps: BaseProps;
export const defaultPollingConfig: PollingConfig;
export const Base: React.ComponentClass<BaseProps, BaseState>;
export interface DetectorProps extends BaseProps {
render: ({ online }: { online: boolean }) => JSX.Element | null;
}
export interface DetectorState extends BaseState {}
export const Detector: React.ComponentClass<DetectorProps, DetectorState>;
export interface OnlineProps extends BaseProps {}
export interface OnlineState extends BaseState {}
export const Online: React.ComponentClass<OnlineProps, OnlineState>;
export interface OfflineProps extends BaseProps {}
export interface OfflineState extends BaseState {}
export const Offline: React.ComponentClass<OfflineProps, OfflineState>;
These definitions were written by Rhythm Bhiwani.
FAQs
TypeScript definitions for react-detect-offline
The npm package @types/react-detect-offline receives a total of 4,099 weekly downloads. As such, @types/react-detect-offline popularity was classified as popular.
We found that @types/react-detect-offline demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.