The problem
I'm using gridjs-react
and I'm getting the following error:
[Grid.js] [ERROR]: The container element [object HTMLDivElement] is not empty. Make sure the container is empty and call render() again
The code
import React from 'react'
import { Grid } from "gridjs-react";
import "gridjs/dist/theme/mermaid.css";
const Grid1 = () => {
return (
<Grid
data = {[
['John', 'john@example.com'],
['Mike', 'mike@gmail.com']
]}
columns = {['Name', 'Email']}
search = {true}
sort={true}
/>
)
}
export default Grid1
Does anyone know how to solve it?