Below is some sample React code. Be sure to insert your own Organization’s API key and an Importer ID from your account. They can be found on the Importers page.

import FuseImporter from "fuse-importer";
import React from "react";

const App = () => {
  const showImporter = () => {
    const organizationApiKey = "YOUR ORGANIZATIONS API KEY";
    const templateId = "YOUR TEMPLATE ID";

    if (
      organizationApiKey.indexOf("YOUR") !== -1 ||
      templateId.indexOf("YOUR") !== -1
    ) {
      window.confirm(
        "You need to configure your organization api key and template id."
      );
      return;
    }

    const importer = new FuseImporter(organizationApiKey, templateId);

    importer.onSubmit = async (records) => {
      return {
        message: "Data imported successfully",
        errors: {}
      };
    };

    importer.onValidateRecord = async (record) => {
      return { errors: {}, warnings: {} };
    };

    importer.show();
  };

  return (
    <>
      <button onClick={showImporter}>Show Importer</button>
    </>
  );
};

export default App;