react-drift-web
v0.1.0
Published
React component implementation of the Drift chat widget for websites
Downloads
9
Readme
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!