network.CellularGeneration
The radio's generation on a cellular network: '2g', '3g', '4g' or '5g'.
Utilisation
Display an offline hint
Ce type est utilisé par 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>;
}Déclaration du type
export type CellularGeneration = Generation;Type
"2g" | "3g" | "4g" | "5g"Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.