Getting Started

Getting Started: Installing into a React Component

If you are using React to install ReplyBox Reviews you will probably need a slightly different installation due to the way React works.

Here we show how to use a component to install.

import React, { useEffect } from "react";

const ReviewBox = () => {

  useEffect(() => {

    if (window.replybox.site) return;

    window.replybox = {
      site: "J8M03mBNIO"
    };

    const script = document.createElement("script");
    script.src = "https://cdn.replyboxreviews.com/js/embed.js";
    script.async = true;

    document.body.appendChild(script);

    return () => {
      document.body.removeChild(script);
    };

  }, []);

  return <div id="replybox"></div>;

};

export default ReviewBox;

Get in touch with us if you’re having issues.

Keep up to date with what's new at ReplyBox.

Black Friday
50
%
off
Use codeBFCM2024at checkout
Buy Now