network.NetworkDetails
Whether the current network costs the user money, and its generation on cellular.
Usage
Display an offline hint
This type is used by network.state
import { Text, network } from 'kuito';
network.state.value; // the state now, synchronously
await network.refresh(); // the same, read off the JS thread
function OfflineBanner() {
return <Text>{network.state.value.isInternetReachable ? '' : 'You are offline'}</Text>;
}Type declaration
export type NetworkDetails = Details;Members 2
| Name | Type | Required | Description |
|---|---|---|---|
isExpensive | boolean | Yes | Traffic may cost the user: cellular, a hotspot, or a network marked metered. |
cellularGeneration | CellularGeneration | Yes | The radio's generation on cellular; null elsewhere or when the platform won't say. |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.