Reaccionar nativo - WebView

En este capítulo, aprenderemos a usar WebView. Se utiliza cuando desea representar una página web en su aplicación móvil en línea.

Usando WebView

los HomeContainer será un componente contenedor.

App.js

import React, { Component } from 'react'
import WebViewExample from './web_view_example.js'

const App = () => {
   return (
      <WebViewExample/>
   )
}
export default App;

Creemos un nuevo archivo llamado WebViewExample.js dentro de src/components/home carpeta.

web_view_example.js

import React, { Component } from 'react'
import { View, WebView, StyleSheet }

from 'react-native'
const WebViewExample = () => {
   return (
      <View style = {styles.container}>
         <WebView
         source = {{ uri:
         'https://www.google.com/?gws_rd=cr,ssl&ei=SICcV9_EFqqk6ASA3ZaABA#q=tutorialspoint' }}
         />
      </View>
   )
}
export default WebViewExample;

const styles = StyleSheet.create({
   container: {
      height: 350,
   }
})

El programa anterior generará la siguiente salida.