use-intercom-hook
v0.1.2
Published
A React Hook for loading Intercom in your site
Downloads
337
Maintainers
Readme
useIntercom hook
A React Hook to add Intercom to your site
Installation
$ npm install use-intercom-hook
or
$ yarn add use-intercom-hook
Example Usage
import React from "react";
import ReactDOM from "react-dom";
import useIntercom from "use-intercom-hook";
const appId = "INSERT_YOUR_APP_ID";
function App() {
useIntercom(appId);
return <div>Hello there</div>;
}
const rootElement = document.getElementById("root");
ReactDOM.render(<App />, rootElement);
View on CodeSandbox
License
MIT