In this tutorial we will learn How to create react native webview app. You can use this trick to Convert Website into Android or IOS Mobile App with React Native.
Table of Contents
React Native Source Code
Simple React Native source code to convert website into android and ios app.
command to download ebview dependencies
npm install react-native-webview
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import { WebView } from 'react-native-webview';
export default function App() {
return (
<WebView style={styles.container}
source={{uri:'https://howtocodeschool.com/'}}
/>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});