React Deploy
React Deploy
#https://github.com/facebook/react-native.git - xxx
react-native init appname
cd appname
npm install
yarn add react-native-webview or npm install --save react-native-webview
react-native link react-native-webview
apt install gem
apt-get install ruby-dev
gem install -n /usr/local/bin cocoapods
pod install
App.js >
import * as React from 'react';
import { Text, View, StyleSheet,ActivityIndicator } from 'react-native';
import { WebView } from 'react-native-webview';
import { Card } from 'react-native-paper';
function LoadingIndicatorView() {
return <ActivityIndicator color='#009b88' size='large' />
}
export default function App() {
return (
<WebView
originWhitelist={['*']}
source={{ uri: 'https://web.site' }}
renderLoading={this.LoadingIndicatorView}
startInLoadingState={true}
/>
);
react-native run-android