Skip to content

trouble rendering as a component #17

@indefinitelee

Description

@indefinitelee

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions