Utilização

Display an offline hint

Este tipo é usado por network.state

tsx
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>;
}

Declaração do tipo

ts
export type NetworkDetails = Details;

Membros 2

NomeTipoObrigatórioDescrição
isExpensivebooleanSimTraffic may cost the user: cellular, a hotspot, or a network marked metered.
cellularGenerationCellularGenerationSimThe radio's generation on cellular; null elsewhere or when the platform won't say.
Gerado a partir das declarações TypeScript públicas: assinaturas, props e predefinições vêm da fonte verificada, as descrições da sua JSDoc. Nenhuma predefinição é inventada.