Aucune description

App.js 1.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. * Sample React Native App
  3. * https://github.com/facebook/react-native
  4. *
  5. * @format
  6. */
  7. import React, { Component } from 'react';
  8. import { Platform, StyleSheet, Text, View } from 'react-native';
  9. import { WebView } from 'react-native-webview'
  10. const instructions = Platform.select({
  11. ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
  12. android:
  13. 'Double tap R on your keyboard to reload,\n' +
  14. 'Shake or press menu button for dev menu',
  15. });
  16. export default class App extends Component {
  17. render() {
  18. return (
  19. <View testID="welcome" style={styles.container}>
  20. <Text style={styles.welcome}>Welcome to React Native!</Text>
  21. <WebView
  22. testID="testWebView"
  23. style={styles.webview}
  24. src={{ uri: "https://www.facebook.com/Engineering/" }}
  25. />
  26. </View>
  27. );
  28. }
  29. }
  30. const styles = StyleSheet.create({
  31. container: {
  32. flex: 1,
  33. justifyContent: 'center',
  34. alignItems: 'center',
  35. backgroundColor: '#F5FCFF',
  36. },
  37. welcome: {
  38. fontSize: 20,
  39. textAlign: 'center',
  40. margin: 10,
  41. },
  42. webview: {
  43. marginBottom: 5,
  44. },
  45. });