react-json-table icon indicating copy to clipboard operation
react-json-table copied to clipboard

trouble rendering as a component

Open indefinitelee opened this issue 8 years ago • 0 comments

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?

indefinitelee avatar Dec 13 '16 16:12 indefinitelee