Created
October 1, 2023 08:17
-
-
Save lupikovoleg/8048d425a54390912d06568ebc3d137f to your computer and use it in GitHub Desktop.
React Native WebView Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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