Skip to content

Instantly share code, notes, and snippets.

@lupikovoleg
Created October 1, 2023 08:17
Show Gist options
  • Save lupikovoleg/8048d425a54390912d06568ebc3d137f to your computer and use it in GitHub Desktop.
Save lupikovoleg/8048d425a54390912d06568ebc3d137f to your computer and use it in GitHub Desktop.
React Native WebView Example
import React, { Component } from 'react';
import { SafeAreaView, StyleProp, ViewStyle } from "react-native";
import { WebView } from 'react-native-webview';
interface MyWebProps {}
interface MyWebState {}
class MyWeb extends Component<MyWebProps, MyWebState> {
render() {
const style: StyleProp<ViewStyle> = { flex: 1 };
return (
<SafeAreaView style={style}>
<WebView
source={{ uri: 'https://vc.ru/' }}
/>
</SafeAreaView>
);
}
}
export default MyWeb;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment