Skip to content
Hazelsong

Two lines

Testimonials on React or Next.js

A div and a script appended once, in an effect.

Paste these two lines

Paste these two lines
<script src="https://hazelsong.com/widget/YOUR-SLUG.js?template=wall" async></script>
<div id="hazelsong-wall"></div>

Your slug is in your dashboard, with the tag ready to copy.

Where they go

  1. Render <div id="hazelsong-wall" /> where the testimonials belong.
  2. In a useEffect that runs once, create a script element with the widget's src and append it to the container.
  3. Remove it in the effect's cleanup so a fast refresh does not append it twice.
  4. In Next.js you can use next/script with strategy="afterInteractive" instead, which does the same thing.

What you already have

Each guide below is one of those places and React or Next.js together: how they come across, and where they go.

Collect one, and put it on React or Next.js

A form link, a customer who writes for a minute, and two lines on your page.