Usage

Follow navigation inside embedded content.

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

Type declaration

ts
export type WebViewNavigation = {
  url: string;
  title: string;
  loading: boolean;
  canGoBack: boolean;
  canGoForward: boolean;
};

Members 5

NameTypeRequiredDescription
urlstringYes—
titlestringYes—
loadingbooleanYes—
canGoBackbooleanYes—
canGoForwardbooleanYes—
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.