import { WebView } from "react-native-webview";
const [currentUrl, setCurrentUrl] = useState<string>('https://home-page.url');
const props = {
source: { uri: currentUrl },
injectedJavaScriptBeforeContentLoaded: '...',
injectedJavaScript: '...',
sharedCookiesEnabled: true,
contentMode: "mobile",
thirdPartyCookiesEnabled: true,
domStorageEnabled: true,
javaScriptEnabled: true,
mixedContentMode: "compatibility",
startInLoadingState: false,
originWhitelist: ["*"],
cacheEnabled: true,
incognito: false,
useSharedProcessPool: true,
allowUniversalAccessFromFileURLs: true,
}
return <WebView
{...props}
/>
import { WebView } from "react-native-webview";
const [currentUrl, setCurrentUrl] = useState<string>('https://home-page.url');
const props = {
source: { uri: currentUrl },
injectedJavaScriptBeforeContentLoaded: '...',
injectedJavaScript: '...',
sharedCookiesEnabled: true,
contentMode: "mobile",
thirdPartyCookiesEnabled: true,
domStorageEnabled: true,
javaScriptEnabled: true,
mixedContentMode: "compatibility",
startInLoadingState: false,
originWhitelist: ["*"],
cacheEnabled: true,
incognito: false,
useSharedProcessPool: true,
allowUniversalAccessFromFileURLs: true,
}
return <WebView
{...props}
/>