0% found this document useful (0 votes)
48 views

React Deploy

This document provides instructions for setting up a development environment for a React Native application with the following key steps: 1. It installs necessary packages like Node.js, cURL, and Watchman using apt. 2. It clones and builds the Watchman repository from GitHub. 3. It installs Yarn and initializes a new React Native app called "appname". 4. It installs and links the react-native-webview module and defines a basic App component to display a web view.

Uploaded by

Loku Bappa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

React Deploy

This document provides instructions for setting up a development environment for a React Native application with the following key steps: 1. It installs necessary packages like Node.js, cURL, and Watchman using apt. 2. It clones and builds the Watchman repository from GitHub. 3. It installs Yarn and initializes a new React Native app called "appname". 4. It installs and links the react-native-webview module and defines a basic App component to display a web view.

Uploaded by

Loku Bappa
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

sudo apt update

sudo apt -y install curl dirmngr apt-transport-https lsb-release ca-certificates


curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt -y install nodejs

git clone https://github.com/facebook/watchman.git


cd watchman/
git checkout v4.9.0
sudo apt-get install -y autoconf automake build-essential python-dev libssl-dev libtool
./autogen.sh
./configure
make
sudo make install

sudo apt remove cmdtest


sudo apt remove yarn
sudo npm install -g yarn

#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

You might also like