1

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?

NickS1
  • 496
  • 1
  • 6
  • 19

1 Answers1

0

Don t know react but i don t see a render to a div in ? The div should be empty event between the and (no spaces or return)

Laurent Bertin
  • 151
  • 1
  • 5