
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
react-intercom
Advanced tools
A component to configure and enable Intercom in your react application. react-intercom
is meant to support both the legacy and current versions of intercom messenger. If you run into issues, please submit an issue. Pull requests are also welcome!
npm i react-intercom --save
Inside of your application where you would be running Intercom, insert Intercom
:
import React from 'react';
import Intercom from 'react-intercom';
export class App extends React.Component {
render () {
const { appUser } = this.props;
const user = {
user_id: appUser.id,
email: appUser.email,
name: appUser.name
};
return (
<div className="app">
<Intercom appID="az33rewf" { ...user } />
</div>
);
}
}
This loads the javascript required to boot Intercom, and will update the settings when the props change. For example, when the active user changes in the application, new props should be passed to reflect that, and Intercom will be registering the new user. react-intercom
also exports the singleton window.Intercom
if you'd rather interact with a module than window
. For example, where you'd like to log an event in your application:
import { IntercomAPI } from 'react-intercom';
IntercomAPI('trackEvent', 'invited-friend');
This is, of course, equivalent to just calling window.Intercom('trackEvent', 'invited-friend');
or even Intercom('trackEvent', 'invited-friend');
.
FAQs
A component to initialize Intercom in your application
The npm package react-intercom receives a total of 13,260 weekly downloads. As such, react-intercom popularity was classified as popular.
We found that react-intercom demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.