material-table
material-table copied to clipboard
ReferenceError: State not defined
Hey,
I am using a functional-based component instead of a class-based one, so when I try to use state = { columns: [] } then I get the ReferenceError; how do I get it to work? Thanks.
function EditTable(props) {
//ReferenceError
state = {columns : [
{ title: "App/Component", field: "app_componenet_name" },
{ title: "Container Source", field: "container_source" },
];
}
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.