Socket
Socket
Sign inDemoInstall

chalo-location-search-input

Package Overview
Dependencies
301
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    chalo-location-search-input

A React component to build a customized UI of https://github.com/hibiken/react-places-autocomplete


Version published
Weekly downloads
4
increased by100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Welcome to chalo-location-search-input!

Hi! It's a React component to build a customized UI of https://github.com/hibiken/react-places-autocomplete.

It's too a component Google Maps Places Autocomplete for React.

Install-package

  • npm install chalo-location-search-input
  • yarn add chalo-location-search-input

What does it?

Example

It connects to the google API and returns the validated address

How to implated it?

You can see the example complete in directory src/example/ExampleImplementation.js

    // src/example/ExampleImplementation.js
    ...
    //It's a method when response ok
    handleSuccess = response => {
        console.log("success: Direction valid",response);
    };

    //It's a method when response bad
    handleError = response => {
        console.log("error: Direction inavlid",response);
    };

    render () {
        return (<LocationSearchInput
        handleSuccess={this.handleSuccess}
        handleError={this.handleError}
        />)
    }

Additional note, the Google API script is required.

    //public/index.html
    ...
    <body>
        <noscript>You need to enable JavaScript to run this app.</noscript>
        <div id="root"></div>
        <script src="https://maps.googleapis.com/maps/api/js?key=YOUR-KEY-GOOGLE-API&libraries=places"></script>
    </body>
    ...

Keywords

FAQs

Last updated on 03 Sep 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc