WebViewNavigation
The page's state, on every load and navigation event.
Verwendung
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} />
</>;Typdeklaration
export type WebViewNavigation = {
url: string;
title: string;
loading: boolean;
canGoBack: boolean;
canGoForward: boolean;
};Mitglieder 5
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
url | string | Ja | — |
title | string | Ja | — |
loading | boolean | Ja | — |
canGoBack | boolean | Ja | — |
canGoForward | boolean | Ja | — |
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.