network.CellularGeneration
The radio's generation on a cellular network: '2g', '3g', '4g' or '5g'.
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 CellularGeneration = Generation;Type
"2g" | "3g" | "4g" | "5g"Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.