0.1.0 • Published 4 years ago

react-drift-web v0.1.0

Weekly downloads
64
License
MIT
Repository
github
Last release
4 years ago

react-drift-web

React component implementation of the Drift chat widget for websites

Installation

npm install react-drift-web

Usage

Add to the entrypoint of your application:

...
import Drift from 'react-drift-web'
...
<Drift appId="YOUR_APP_ID />
...

where appId is your application identifier provided by Drift

Optionally, call the widget API in componentDidMount/useEffect of your components:

...
import { driftApi } from 'react-drift-web'
...
componentDidMount {
  driftApi.METHOD()
}
...

where METHOD is any browser API method (see here)

That's it! Enjoy!

License

MIT