Security News
The Dark Side of Open Source
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
react-geocomplete
Advanced tools
Readme
A React autosuggest for the Google Maps Places API. This is based on Ubilabs' Geosuggest. For rundown of important differences, please see below.
value()
getter method.As this component uses the Google Maps Places API to get suggests, you must include the Google Maps Places API in the <head>
of your HTML:
<!DOCTYPE html>
<html>
<head>
…
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY_HERE&libraries=places"></script>
</head>
<body>
…
</body>
</html>
Visit the Google Developer Console to generate your API key.
The easiest way to use geocomplete is to install it from NPM and include it in your own React build process (using Browserify, Webpack, etc).
You might also be able to use the standalone build by including dist/react-geosuggest.js
in your page. If you use this, make sure you have already included React, and it is available as a global variable. I've never been able to get this to work though.
npm install react-geocomplete --save
For using the base component, please see Ubilabs documentation. It's mostly the same as that.
The ValidatedGeocomplete is very similar to the Geocomplete component, except that it allows you to validate that your input matches an autocomplete description or that the field is required. You can provide a custom component for the validation errors.
Type: Component
Default: null
This element, when provided, will impose a validation constraint on the element that its value must match an autocomplete suggestion description. The notFoundErrorComponent
component may make use of the userInput
property which will be passed to it.
Type: Component
Default: null
This element, when provided, will impose a validation constraint on the element that its value must be present.
See LICENSE.md
FAQs
A React autosuggest/autocomplete for the Google Maps Places API. Also comes with a validation component.
The npm package react-geocomplete receives a total of 4 weekly downloads. As such, react-geocomplete popularity was classified as not popular.
We found that react-geocomplete demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At Node Congress, Socket CEO Feross Aboukhadijeh uncovers the darker aspects of open source, where applications that rely heavily on third-party dependencies can be exploited in supply chain attacks.
Research
Security News
The Socket Research team found this npm package includes code for collecting sensitive developer information, including your operating system username, Git username, and Git email.
Security News
OpenJS is warning of social engineering takeovers targeting open source projects after receiving a credible attempt on the foundation.