JSFiddle - React, Tailwind, and code Playground
HTML
<script src="http://maps.googleapis.com/maps/api/js?sensor=false&libraries=places&dummy=.js"></script>
<input type="text" class="form-control booking address" id="pickup" placeholder="From">
<input type="text" class="form-control booking address" id="destination" placeholder="To">
JavaScript
$(document).ready(function () {
addressLookup();
});
function addressLookup() {
var address = document.getElementsByClassName('form-control booking address');
var options = {
componentRestrictions: {
country: 'uk'
}
};
new google.maps.places.Autocomplete(address, options);
}