title: how can i get user location for webview app in react native? for showing current user location on google map
body: <p>am newbie at react native and i have a task to do .. please help me...
  i have an app smiller to uber .. and i want to take user current location to show his location then the destination .. idk how to do this :(</p>
  <pre><code>import React , {useState , useEffect , useRef} from 'react';
  import { WebView } from 'react-native-webview';
  import { StyleSheet , BackHandler } from 'react-native';
  import Constants from 'expo-constants';
  
  export default function App() {
  
    const webviewref = useRef(null);
    const [canGoBack , setCanGoBack] = useState(false);
    const [canGoForward , setCanForward] = useState(false);
    const [currentUrl , setCurrentUrl] = useState('https://my-website');
  
    const backAction = () =&gt; {
      if(canGoBack){
        webviewref.current.goBack();
      }else{
        BackHandler.exitApp();
      }
      return true
    }
  
    useEffect(()=&gt;{
  
      BackHandler.addEventListener(&quot;hardwareBackPress&quot;, backAction);
      () =&gt; BackHandler.removeEventListener(&quot;hardwareBackPress&quot;, backAction);
  
    },[ canGoBack ])
  
    return (
      &lt;WebView 
  
        ref={webviewref}
        style={styles.container}
        source={{ uri: currentUrl }}
        onNavigationStateChange={navState =&gt;{
  
          setCanGoBack(navState.canGoBack);
          setCanForward(navState.canGoForward);
          setCurrentUrl(navState.url);
  
        }}
      /&gt;
    );}
  
  const styles = StyleSheet.create({
    container: {
      flex: 1,
      marginTop: Constants.statusBarHeight,
    },
  });
  </code></pre>