@autoaddress.com/aa3-react

3.1.68 • Public • Published

Read me

Autoaddress reactjs

The AA3-react library for using the Autoaddress Control in React applications.

Installation

Using npm:

    npm install '@autoaddress.com/aa3-react'

Importing the component:

    import Autoaddress from '@autoaddress.com/aa3-react'

Creating the component

You can then use it in your React component:

    <Autoaddress apiKey='your key' elementId='aa-control' />

As a minimum requirement, an apiKey and elementId will have to be provided to send requests to the Autoaddress control.

For a list of configuration options please refer to this link:

https://docs.autoaddress.com/article/226-javascript-control-configuration

The Autoaddress component is event driven and we have provided the opportunity for you to hook into these events and add your own logic with custom callback functions. These events range from when the component is initialised all the way to the end when your address has been found.

We also pass data back in key events so you can grab these data and perform custom actions to suit your own needs.

Here is an example of an event when an address is found and gets logged in the console:

    <Autoaddress apiKey='your apiKey' elementId='aa-control' onPostLookup={(data) => {console.log(data)}} />

OR you can bind the callback to a function like below:

    let returnLookupResult = (data) => { console.log(data)};
    <Autoaddress apiKey='your apiKey' elementId='aa-control' onPostLookup={returnLookupResult} />

You can check all callback events from this link:

https://docs.autoaddress.com/article/226-javascript-control-configuration

Readme

Keywords

Package Sidebar

Install

npm i @autoaddress.com/aa3-react

Weekly Downloads

9

Version

3.1.68

License

ISC

Unpacked Size

111 kB

Total Files

4

Last publish

Collaborators

  • stevenfitzpatrickautoaddress
  • jackheadland.autoaddress
  • amar.ghale.autoaddress
  • saoirsehoulihan
  • davin.gaffney.autoaddress
  • kevin.santiago.autoaddress
  • autoaddress