title: Expecting new line or a semicolon
body: <p>I am trying to display new page and start navigating automatically whenever user inputs both location in the input field. For that i am using useEffect method. But the object created is not working as expected and giving me error as</p>
  <p><code>, or ) expected</code></p>
  <pre><code>ESLint: Parsing error: Unexpected token, expected &amp;quot;,&amp;quot;
  
  
  Expecting newline or semicolon
  </code></pre>
  <p>Can someone help me. As i am learning, i am new to all these. I have encountered almost same problem before. But i managed to fix it. It may be problem with the object. Anyone who can solve this, please explain it in detail.
  Code is as follow:</p>
  <pre><code>import React, {useEffect, 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 [originPlace, setOriginPlace] = useState({initalState: 'null'});
    const [destinationPlace, setDestinationPlace] = useState({
      initalState: 'null',
    });
    useEffect(effect:()=&gt;{
      if(originPlace &amp;&amp; destinationPlace) {}
    },deps[originPlace, destinationPlace])
  
    return (
      &lt;SafeAreaView&gt;
        &lt;View style={styles.container}&gt;
          &lt;GooglePlacesAutocomplete
            placeholder=&quot;From where?&quot;
            onPress={(
              data: GooglePlaceData,
              details: GooglePlaceDetail | null = null,
            ) =&gt; {
              setDestinationPlace({value: {data, details}});
              console.log(data, details);
            }}
            styles={{
              textInput: styles.textInput,
            }}
            fetchDetails
            query={{
              key: 'AIzaSyB3rsn2ecpXZ8p9d8J_kLIH59rxt9KV6Rs',
              language: 'en',
            }}
          /&gt;
  
          &lt;GooglePlacesAutocomplete
            placeholder=&quot;Where to?&quot;
            onPress={(
              data: GooglePlaceData,
              details: GooglePlaceDetail | null = null,
            ) =&gt; {
              setDestinationPlace({value: {data, details}});
              console.log(data, details);
            }}
            styles={{
              textInput: styles.textInput,
            }}
            fetchDetails
            query={{
              key: 'AIzaSyB3rsn2ecpXZ8p9d8J_kLIH59rxt9KV6Rs',
              language: 'en',
            }}
          /&gt;
        &lt;/View&gt;
      &lt;/SafeAreaView&gt;
    );
  };
  
  export default DestinationSearch;
  </code></pre>