Looking for maintainer. Contact [email protected] if you're interested.
React wrapper for Algolia Places ![codecov](https://camo.githubusercontent.com/c67503aa5c545e565bb044a0dbf7da73ebd87a33c4e4a2f1179deb381c167741/68747470733a2f2f636f6465636f762e696f2f67682f6b6f6e74726f6c6c616e74656e2f616c676f6c69612d706c616365732d72656163742f6272616e63682f6d61737465722f67726170682f62616467652e737667)
![Known Vulnerabilities](https://camo.githubusercontent.com/109def48dfcc8d725f31bd287527fb5617de409ced6112156ac6f09258ab7603/68747470733a2f2f736e796b2e696f2f746573742f6769746875622f6b6f6e74726f6c6c616e74656e2f616c676f6c69612d706c616365732d72656163742f62616467652e7376673f74617267657446696c653d7061636b6167652e6a736f6e)
![Build Status](https://camo.githubusercontent.com/d206d749e53169b58bc46befe68a67698046828cf02ab52ab0fbe55774b9e94a/68747470733a2f2f7472617669732d63692e6f72672f6b6f6e74726f6c6c616e74656e2f616c676f6c69612d706c616365732d72656163742e7376673f6272616e63683d6d6173746572)
Blazing fast address autocomplete React/preact component. ⚡
Checkout the demo at https://address-autocomplete-react.netlify.com/
npm install --save git+https://github.com/nocturneio/algolia-places-react
import React from 'react';
import AlgoliaPlaces from 'algolia-places-react';
export default () => {
return (
<AlgoliaPlaces
placeholder='Write an address here'
options={{
appId: 'my-app-id',
apiKey: 'sharing-is-caring',
language: 'sv',
countries: ['se'],
type: 'city',
// Other options from https://community.algolia.com/places/documentation.html#options
}}
onChange={({ query, rawAnswer, suggestion, suggestionIndex }) =>
console.log('Fired when suggestion selected in the dropdown or hint was validated.')}
onSuggestions={({ rawAnswer, query, suggestions }) =>
console.log('Fired when dropdown receives suggestions. You will receive the array of suggestions that are displayed.')}
onCursorChanged={({ rawAnswer, query, suggestion, suggestonIndex }) =>
console.log('Fired when arrows keys are used to navigate suggestions.')}
onClear={() =>
console.log('Fired when the input is cleared.')}
onLimit={({ message }) =>
console.log('Fired when you reached your current rate limit.')}
onError={({ message }) =>
console.log('Fired when we could not make the request to Algolia Places servers for any reason but reaching your rate limit.')}
/>
);
}
- Implement support for using Places methods
- Investigate using react-autocomplete instead. For smaller bundle and VDOM usage.