react-drift-web
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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

Readme

Keywords

Package Sidebar

Install

npm i react-drift-web

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

13.7 kB

Total Files

6

Last publish

Collaborators

  • alexsabdev