network.refresh
Re-reads the state off the JS thread, for a check right before a request.
Utilização
Display an offline hint
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>;
}Assinaturas
(): Promise<State>Parâmetros
Sem parâmetros.
Devolve
Promise<State>
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.