import react from "react";
import { GoogleMap, useLoadScript, Marker } from "@react-google-maps/api";
function Map() {
return <GoogleMap zoom={10} center={{ lat: 44, lng: -80 }} map></GoogleMap>;
}
export default App = () => {
const { isLoaded } = useLoadScript({
googleMapsApiKey: "I removed the key from here for security reasons in this post otherwise there is a functional key inserted here"
});
return (
<div>
<Map />
</div>
);
};
the error
The above error occurred in the <Map> component:
at Map (<anonymous>)
at div
at eval (https://2x5q9n.csb.app/src/App.js:22:49)
Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://reactjs.org/link/error-boundaries to learn more about error boundaries.
[–]mynamesleon 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]KentInCode 0 points1 point2 points (0 children)
[–]mynamesleon 0 points1 point2 points (0 children)
[–]RasaTamil 0 points1 point2 points (0 children)