react-json-table
react-json-table copied to clipboard
trouble rendering as a component
Trying to render the json table as a component, which is wrapped in my App component. getting the error
Warning: React.createElement: type should not be null, undefined, boolean, or number. It should be a string (for DOM elements) or a ReactClass (for composite components). Check the render method of
Table.
my table code looks like:
import React from 'react';
import { JsonTable } from 'react-json-table';
const Table = props => {
console.log(props)
return(
<div className={styles['table']}>
<JsonTable
rows={props.playersTable}
/>
</div>
);
}
export default Table;
any ideas why this would not work?