Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

tawkto-react

1.0.11 • Public • Published

tawkto-react

A simple script which help integrate tawk.to chat into any react application

Getting Started

Installing

Install package by running

npm install tawkto-react --save

Usage in class component

const tawkTo = require("tawkto-react");

const tawkToPropertyId = 'get_property_id_from_tawkto_dashboard'

componentDidMount(){
    tawkTo(tawkToPropertyId)
}

Usage in functional component

const tawkTo = require("tawkto-react");

const tawkToPropertyId = 'get_property_id_from_tawkto_dashboard'

useEffect(() => {
    tawkTo(tawkToPropertyId)
}, [])

Function must be called after the DOM is loaded, such as inside componentDidMount or useEffect.

Authors

  • Steve Junior

Install

npm i tawkto-react

DownloadsWeekly Downloads

668

Version

1.0.11

License

ISC

Unpacked Size

4.65 kB

Total Files

6

Last publish

Collaborators

  • avatar