Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-freshchat

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-freshchat

FreshChat React implementation

  • 1.0.10
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.9K
decreased by-4.02%
Maintainers
1
Weekly downloads
 
Created
Source

React Freshchat

React Freshchat is a wrapper on top of Freshchat (see oficial doc here https://developers.freshchat.com/).

How to use

DO NOT INCLUDE Freshchat script in head, React Freshchat will automatically add it with lazy load technique

  • Install react-freshchat (see Installation).
  • Import the lib where you initialize your React App.
  • Include the component with the token.

Example

import React from 'react'
import FreshChat from 'react-freshchat'

class App extends React.Component {
  // ...
  render() {
    return <div>
      <FreshChat
        token={config.freshchat.token}
        email: 'user@email.com',
        first_name: '...',
        onInit={widget => {
          /* Use `widget` instead of `window.fcWidget`
            widget.user.setProperties({
              email: user.email,
              first_name: user.firstName,
              last_name: user.lastName,
              phone: user.phoneNumber,
            })
          */
        }}
      />
    </div>
  }
}

For more details: https://developers.freshchat.com/

Installation

Only NPM is supported for now: npm i -s react-freshchat

UMD Support

UMD is supported out of the box.

TODO

  • Unit Testing
  • Integrate Webpack

Keywords

FAQs

Package last updated on 01 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc