title: Mapview - Check the render method of 'App'
body: <p>I'm building mapview in the app by using react native. but I got this error when I run the application:</p>
  
  <blockquote>
    <p>Check the render method of 'App'</p>
  </blockquote>
  
  <p>What's wrong with this code? Sorry I'm new in react native.</p>
  
  <p>App.js</p>
  
  <pre><code>import React, {Component, Fragment} from 'react';
  import {
    Platform,
    StyleSheet,
    View,
    MapView
  } from 'react-native';
  
  type Props = {};
  export default class App extends Component&lt;Props&gt; {
    render() {
      return (
        &lt;View style={styles.container}&gt;
          &lt;MapView
          style={styles.map}
            provider={null}
            initialRegion={{
              latitude: 37.78825,
              longitude: -122.4324,
              latitudeDelta: 0.0922,
              longitudeDelta: 0.0421,
            }}
          /&gt;
        &lt;/View&gt;
      );
    }
  }
  
  const styles = StyleSheet.create({
    container: {
      position: 'absolute',
      top: 0,
      left: 0,
      right: 0,
      bottom: 0,
      justifyContent: 'flex-end',
      alignItems: 'center',
    },
    map: {
      position: 'absolute',
      top: 0,
      left: 0,
      right: 0,
      bottom: 0,
    },
  });
  </code></pre>
  
  <p>index.js</p>
  
  <pre><code>import { AppRegistry } from 'react-native';
  import App from './App';
  
  AppRegistry.registerComponent('newapp', () =&gt; App);
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/ZDQ8V.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZDQ8V.png" alt="enter image description here"></a></p>