@autoaddress.ie/autoaddress-react

1.0.7 • Public • Published

##autoaddress-reactjs-test

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

##Installation

Using npm:

$ npm i -g npm
$ npm i  @autoaddress.ie/autoaddress-react

##Usage

###Importing:

    import Autoaddress from '@autoaddress.ie/autoaddress-react/';

###Creating the Component:

You can then use it in your React component:

    <Autoaddress licencekey='your key'/>

As a minimum requirement, a licencekey will have to be provided to send requests to the Autoaddress control.

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

https://autoaddress.com/en-ie/support/developer-centre/react-component/react-configurations

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 this 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 licencekey='your key' onAddressFound={(data) => {console.log(data)}} />

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

   let returnSearchResult = (data) => { console.log(data)};
    <Autoaddress licencekey='your key' onAddressFound= { returnSearchResult } />

You can check all the other callback events from this link:

https://autoaddress.com/en-ie/support/developer-centre/react-component/react-events

Readme

Keywords

none

Package Sidebar

Install

npm i @autoaddress.ie/autoaddress-react

Weekly Downloads

104

Version

1.0.7

License

ISC

Unpacked Size

180 kB

Total Files

19

Last publish

Collaborators

  • autoaddress
  • kevin.santiago.autoaddress
  • caoimhinblake
  • daniel.guidera