You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+12-1Lines changed: 12 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,18 @@
6
6
7
7
`npm i react-google-autocomplete --save`
8
8
9
-
You also have to include google autocomplete link api in your app. Somewhere in index.html or somwhere else.
9
+
<hr>
10
+
11
+
As of version 1.2.4, you can now pass an `apiKey` prop to automatically load the Google maps scripts. The api key can be found in your [google cloud console.](https://developers.google.com/maps/documentation/javascript/get-api-key)
12
+
13
+
```js
14
+
<AutoComplete
15
+
apiKey={YOUR_GOOGLE_MAPS_API_KEY}
16
+
onPlaceSelected={() =>'do something on select'}
17
+
/>
18
+
```
19
+
20
+
Alternatively if not passing the `apiKey` prop, you can include google autocomplete link api in your app. Somewhere in index.html or somewhere else.
0 commit comments