Appearance
isAppWebView
Phát hiện React Native WebView qua window.ReactNativeWebView.postMessage.
ts
import { isAppWebView, useIsAppWebView } from "@minap/ui";Examples
tsx
import { isAppWebView, useIsAppWebView } from "@minap/ui";
const inWebView = isAppWebView();
// or: const inWebView = useIsAppWebView();Props / API
| Prop / API | Type | Default | Notes |
|---|---|---|---|
(return) | boolean | — | true khi RN bridge postMessage là function |
Behavior
- Dùng bởi TemporalControl auto
- useIsAppWebView an toàn SSR
Mobile / WebView
- Dùng để phân nhánh UI theo viewport hẹp hoặc shell React Native WebView.
- Overlay phức tạp: ưu tiên Sheet trên mobile; xem thêm Overlays.