For the complete documentation index, see llms.txt. This page is also available as Markdown.

React

Steps to integrate the Web SDK into React application.

1. Installation

To install the Preventor Web SDK, add the following to your project’s:

  1. Add https://sdk.preventor.com/pvtid/verifyme/verifyme.esm.js in your public/index.html.

<script
    type="module"
    src="https://sdk.preventor.com/pvtid/verifyme/verifyme.esm.js"
></script>

2. Setup the button in your component file

import React, { useEffect, useRef } from "react";

export default function App() {
  const pvtButtonRef = useRef(null);
  useEffect(() => {
    window.PvtVerifymeConfig = YOUR_CONFIGURATION;
  }, []);

  return <pvt-button ref={pvtButtonRef}></pvt-button>;
}

Last updated