After installing the Material Table using React JS and mapping the data to it, this error will be displayed on the console while running the application. The reason for this is hard for me to imagine.
Below is the table I developed.
`
const empList = [
{ id: 1, name: "Neeraj", email: '[email protected]', phone: 9876543210, city: "Bangalore" },
{ id: 2, name: "Raj", email: '[email protected]', phone: 9812345678, city: "Chennai" },
{ id: 3, name: "David", email: '[email protected]', phone: 7896536289, city: "Jaipur" },
{ id: 4, name: "Vikas", email: '[email protected]', phone: 9087654321, city: "Hyderabad" },
]
const [data, setData] = useState(empList)
const columns = [
{ title: "ID", field: "id", editable: false },
{ title: "Name", field: "name" },
{ title: "Email", field: "email" },
{ title: "Phone Number", field: 'phone', },
{ title: "City", field: "city", }
]
<h5>
List of Services
</h5>
<MaterialTable
title="Employee Data"
data={data}
columns={columns}
/>
</div>`
data={empList}
? – MedfordempList
value is calculated somehow which takes some time. If yes better to set the initial state using a function. – Medford