React Integration
Mount the Testinora widget in any React app without layout issues.
In React, the simplest approach is to render the widget container and append the external script after the component mounts. That keeps the integration predictable whether you are using Vite, CRA, or a custom setup.
Recommended component
import { useEffect } from 'react'
export function TestinoraWidget() {
useEffect(() => {
const script = document.createElement('script')
script.src = 'https://testinora.com/widget.js'
script.dataset.widgetSlug = 'your-slug'
document.body.appendChild(script)
return () => {
script.remove()
}
}, [])
return <div id="testinora-widget" />
}Place this component wherever you want testimonials to appear. If you use React Router or another SPA setup, the widget still works as long as the component is mounted on the page where you want it rendered.
Tip
If you reuse the widget on multiple pages, turn the snippet into a shared React component and pass the widget slug as a prop.