Uncaught TypeError: Cannot read properties of undefined (reading 'aj'): Error coming when am using WebDataRocks Pivot Table

134 Views Asked by At

enter image description hereI was trying to use WebDataRocks Pivot Table for one of my Projects. I am using the basic code I copied from their documentation but it is giving this error: Uncaught TypeError: Cannot read properties of undefined (reading 'aj'). I am getting an empty screen for output and this error in the console.

import React from "react";
import "webdatarocks/webdatarocks.css";
import * as WebDataRocksReact from "react-webdatarocks";

const HqDataTableWebDataRocks = () => {
  return (
    <WebDataRocksReact.Pivot
      toolbar={true}
      componentFolder="https://cdn.webdatarocks.com/"
      width="100%"
      report="https://cdn.webdatarocks.com/reports/report.json"
    />
  );
};

export default HqDataTableWebDataRocks;
1

There are 1 best solutions below

0
iknownothing On

If I remove the <React.StrictMode> from the Index file then it is working. I commented out the Strict Mode Part. If there are any other alternatives please let me know.

import ReactDOM from "react-dom/client";
import "./index.css";
import App from "./App";
import reportWebVitals from "./reportWebVitals";

const root = ReactDOM.createRoot(
  document.getElementById("root") as HTMLElement
);
root.render(
  // <React.StrictMode>
  <
  App / >
  // </React.StrictMode>
);