Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

@autoaddress.ie/autoaddress-react

1.0.5 • Public • Published

autoaddress-react v1.0.5

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

For the full documentation, please go to our website and follow the React documentation from the link below, this documentation will provide a starting point, we recommend following the website for detailed documentation.

https://www.autoaddress.ie/support/developer-centre/react-component

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://www.autoaddress.ie/support/developer-centre/react-component/react-configurations

Events:

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://www.autoaddress.ie/support/developer-centre/react-component/react-events

Styling:

If you want to change the styling of the control, please follow this link:

https://www.autoaddress.ie/support/developer-centre/react-component/react-component-styling

Keywords

none

Install

npm i @autoaddress.ie/autoaddress-react

DownloadsWeekly Downloads

2

Version

1.0.5

License

ISC

Unpacked Size

179 kB

Total Files

3

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar