check all the brackets used in the code at specified line number.e.g.:
in my case this was throwing error –
const [query, setQuery] = useState['']
When i corrected this,
const [query, setQuery] = useState('')
This was working fine for me.
Please check if this fixes your problem.