@voiclet/react v0.0.20
Voiclet React
Voiclet is a React library for using the Voiclet widget on your website. More detailed integration instructions can be found here.
Requirements
- A Voiclet account
- Your client key, found in the API section of your dashboard
Installation
Use the package manager npm to install the library.
npm install @voiclet/react
Alternatively, you can use yarn.
yarn add @voiclet/react
Usage
import React from 'react'
import ReactDOM from 'react-dom'
import { VoicletProvider } from '@voiclet/react'
ReactDOM.render(
<VoicletProvider clientKey='CLIENT_KEY'>...</VoicletProvider>,
document.getElementById('root')
)
Ensure that the VoicletProvider
component is only mounted once per page. If you are using Next.js, you can include the Voiclet widget on every page by including the VoicletProvider
in your custom _app.jsx
file.
import { VoicletProvider } from '@voiclet/react'
function MyApp({ Component, pageProps }) {
return (
<VoicletProvider clientKey='CLIENT_KEY'>
<Component {...pageProps} />
</VoicletProvider>
)
}
export default MyApp
In the examples above, be sure to supplement CLIENT_KEY
with your unique client key.
Support
Feel free to reach out to contact@voiclet.com for technical support.
Contributing
Pull requests are welcome.
License
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago