I have followed the guide at react-grid-layout and I am still getting this error message.
Here is my layout object:
import React from "react";
import { Responsive, WidthProvider } from "react-grid-layout";
import NewvsReturnVisitors from "./newvsreturnvisitors";
import ReactDOM from "react-dom";
import "./styles/styles.css";
const e = React.createElement;
const ResponsiveGridLayout = WidthProvider(Responsive);
function App() {
const layout = [
{ i: "1", x: 0, y: 0, w: 2, h: 1, minW: 2, minH: 1 },
{ i: "2", x: 10, y: 0, w: 2, h: 1, minW: 2, minH: 1 }
];
return (
<ResponsiveGridLayout
layouts={layout}
>
<div key="1">
<NewvsReturnVisitors />
</div>
</ResponsiveGridLayout>
);
}
ReactDOM.render(e(App), document.getElementById("root"));
My Codesanbox is here:
Just open the console and the error message is there. Will appreciate any help!