
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
react-google-uni-autocomplete
Advanced tools
This is two react components for working with google autocomplete
npm i react-google-autocomplete --save
You also have to include google autocomplete link api in your app. Somewhere in index.html or somwehrer else.
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=[YOUR_API_KEY]&libraries=places"></script>
#Simple component out of box.
import {ReactGoogleAutocomplete} from 'react-google-autocomplete';
<ReactGoogleAutocomplete
style={{width: '90%'}}
onPlaceSelected={(place) => {
console.log(place);
}}
/>
The component has one function called onPlaceSelected
. The function gets invoked every time a user chooses location.
#Custom component
This component allows you point your own component as input, list's box, item. Here is example.
import {ReactCustomGoogleAutocomplete} from 'react-google-autocomplete';
//input itself
<ReactCustomGoogleAutocomplete
{...fields.cityAutocomplete}
input={<TextField/>}
style={{width: '90%'}}
initialValue={fields.location.value}
onOpen={(list) => this.setState({list})}
onClose={() => this.setState({list: null})}
/>
//dropdown container
<PopupContainer
isOpened={this.state.list}
onClose={() => {
if (this.state.list) {
this.setState({list: null});
}
}}
>
{this.state.list && this.state.list.map(item =>
<FlatButton
style={{width: '100%', textAlign: 'left'}}
onClick={() => {
console.log(item);
}}
label={item.description}
/>
)}
</ PopupContainer>
Props
FAQs
React components for google autocomplete.
The npm package react-google-uni-autocomplete receives a total of 2 weekly downloads. As such, react-google-uni-autocomplete popularity was classified as not popular.
We found that react-google-uni-autocomplete 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
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.