WebViewNavigation
The page's state, on every load and navigation event.
Utilisation
Follow navigation inside embedded content.
// Follow navigation inside embedded content.
import { Text, WebView, signal, type WebViewNavigation } from 'kuito';
const state = signal<WebViewNavigation | null>(null);
// Every load and navigation event carries the page's state.
const follow = (event: WebViewNavigation) => (state.value = event);
<>
<Text>{state.value?.loading ? 'Loading…' : state.value?.title}</Text>
<WebView src="https://example.com" flex={1} onLoad={follow} onNavigate={follow} />
</>;Déclaration du type
export type WebViewNavigation = {
url: string;
title: string;
loading: boolean;
canGoBack: boolean;
canGoForward: boolean;
};Membres 5
| Nom | Type | Requis | Description |
|---|---|---|---|
url | string | Oui | — |
title | string | Oui | — |
loading | boolean | Oui | — |
canGoBack | boolean | Oui | — |
canGoForward | boolean | Oui | — |
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.