0.3.6 • Published 2 years ago
@mahdivajdi/raychat-react v0.3.6
RayChat widget installer for ReactJS/NextJS
The new online chat experience begins here!
Get closer to your leads and customers with a website chat widget. Adding a chat widget to your website will make your customer service experience even more exceptional.
Install
npm i @raychat/widget-react
Use in ReactJS
Get
token
from raychat.io
Wrote to App.js:
import { useEffect } from "react";
import { raychat } from "@mahdivajdi/raychat-react";
function App() {
useEffect(() => {
const token = "6d5b4ba5-xxxx-xxxx-xxxx-48498f3fc2a2";
raychat(token);
}, []);
// rest of the code
}
Use in NextJS (js/ts)
Get
token
from raychat.io
Wrote to _App.js/_App.ts
import { raychat } from "@mahdivajdi/raychat-react";
import { useEffect } from "react";
export default function App({ Component, pageProps }) {
useEffect(() => {
const token = "6d5b4ba5-xxxx-xxxx-xxxx-48498f3fc2a2";
raychat(token);
}, []);
// rest of the code
}
Props
props | defaultValue | description |
---|---|---|
token | null | Get token from raychat.io |
License
MIT
Author
Mahdi Vajdi Github: @mahdi-vajdi Email: mahdivajdii@gmail.com