webViewRef
Creates a WebViewRef while a component sets up: a WebView ref with url, title, loading and history signals.
Usage
Give an embedded help page a reload action.
// Give an embedded help page a reload action.
import { Button, WebView, VStack, webViewRef } from 'kuito';
export function Help() {
const page = webViewRef();
return (
<VStack flex={1}>
<Button
disabled={page.loading.value}
onPress={() => void page.current?.reload().catch(console.error)}
>
Reload help
</Button>
<WebView
ref={page}
src="https://example.com/help"
allowedOrigins={['https://example.com']}
flex={1}
/>
</VStack>
);
}Signatures
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.