【发布时间】:2020-01-25 10:04:25
【问题描述】:
我在我的项目中尝试了 react google api。我在 Google Cloud 中创建了计数并且我有 api。 我有这个代码:
import { GoogleComponent } from "react-google-location";
export default function Home() {
const API_KEY_GOOGLE = "XXXXX";
return (
<div className="home">
<h1>GHome</h1>
<div>
<GoogleComponent
apiKey={API_KEY_GOOGLE}
language={"en"}
country={"country:in|country:us"}
coordinates={true}
// locationBoxStyle={"custom-style"}
// locationListStyle={"custom-style-list"}
onChange={e => {
setPlace({ place: e });
}}
/>
</div>
</div>
);
}
【问题讨论】:
-
请勿发布代码、数据、错误消息等的图片 - 将文本复制或输入到问题中。 How to Ask
标签: reactjs react-hooks