network.NetworkStateType
The transport of the network the system routes traffic through.
Verwendung
Display an offline hint
Dieser Typ wird verwendet von 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>;
}Typdeklaration
export type NetworkStateType = StateType;Typ
"none" | "unknown" | "wifi" | "cellular" | "ethernet"Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.