Skip to content
Advertisement

TypeError: Object(…) is not a function (React)

I was following a tutorial on how to add google maps to a react/expo javascript project. I am new to the javascript language and have had a bug that I cannot find an answer to. when compiling the app I am given the error “TypeError: Object(…) is not a function“. here is the link to the tutorial: https://www.youtube.com/watch?v=WZcxJGmLbSo&t. Thank you.

The error is on the line 25 of the script:

JavaScript

Full script:

JavaScript

Advertisement

Answer

I think your import(UseLoadScript) is wrong. Check here once useLoadScript

JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement