Quantcast
Channel: Active questions tagged react-native+ios - Stack Overflow
Viewing all articles
Browse latest Browse all 16750

When I use Map View I got this error Object(.) is not a function nativeComponent node_modules/react-native-maps/lib/components/MapView.js

$
0
0
import React from 'react'; import {View, Text, StyleSheet, Button} from 'react-native'; import MapView, { PROVIDER_GOOGLE } from 'react-native-maps';  const ExplorScreen =({navigation})=>{    return (<View style={styles.container}><MapView        provider={PROVIDER_GOOGLE} // remove if not using Google Maps        style={styles.map}        region={{          latitude: 37.78825,          longitude: -122.4324,          latitudeDelta: 0.015,          longitudeDelta: 0.0121,        }}></MapView></View>    );  }  export default ExplorScreen;  const styles = StyleSheet.create({    container: {      ...StyleSheet.absoluteFillObject,      height: 400,      width: 400,      justifyContent: 'flex-end',      alignItems: 'center',    },    map: {      ...StyleSheet.absoluteFillObject,    },   });

I am working on the above code. I don't know what is wrong: every time I use mapview package I get this error. I'm using Chrome browser to see my app result.


Viewing all articles
Browse latest Browse all 16750

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>