title: Type Annotations can only be used in TypeScript Files and parsing error in REACT-NATIVE
body: <p>I am currently learning react native and trying to create UBER CLONE. But i am facing certain issues regarding Type annotations and Parsing. Also whenever i rename my app.js into app.jsx it stops working and i have to switch it back to app.js. Error is in line number 30 and 31. Someone Help me to fix this.</p>
  <p>Here is the code.</p>
  <pre><code>import React, {useState} from 'react';
  import {View, TextInput, SafeAreaView} from 'react-native';
  import {GooglePlacesAutocomplete} from 'react-native-google-places-autocomplete';
  
  import styles from './styles';
  
  const DestinationSearch = props =&gt; {
    const [fromText, setFromText] = useState({initalState: ''});
    const [destinationText, setDestinationText] = useState({initalState: ''});
  
    const [originPlace, setOriginPlace] = useState({initalState: 'null'});
    const [destinationPlace, setDestinationPlace] = useState({initalState:'null'});
    return (
      &lt;SafeAreaView&gt;
        &lt;View style={styles.container}&gt;
          &lt;TextInput
            value={fromText}
            onChangeText={setFromText}
            style={styles.textInput}
            placeholder=&quot;From&quot;
          /&gt;
          &lt;TextInput
            value={destinationText}
            onChangeText={setDestinationText}
            style={styles.textInput}
            placeholder=&quot;Where to?&quot;
          /&gt;
          &lt;GooglePlacesAutocomplete
            placeholder=&quot;Where to?&quot;
            onPress={(data:GooglePlaceData, details:GooglePlaceDetail | null = null) =&gt; {
              setDestinationPlace(value:{data, details});
            }}
            fetchDetails
            query={{
              key: 'AIzaSyB3rsn2ecpXZ8p9d8J_kLIH59rxt9KV6Rs',
              language: 'en',
            }}
          /&gt;
        &lt;/View&gt;
      &lt;/SafeAreaView&gt;
    );
  };
  
  export default DestinationSearch;
  </code></pre>
  <p>Error is :</p>
  <pre><code>Parsing error: Unexpected token, expected &quot;:&quot;
  
    29 |           placeholder=&quot;Where to?&quot;
    30 |           onPress={(data:GooglePlaceData, details:GooglePlaceDetail | null = null) =&gt; {
  &gt; 31 |             setDestinationPlace(value:{data, details});
       |                                            ^
    32 |           }}
    33 |           fetchDetails
    34 |           query={{
  </code></pre>