glittershark / reactable

Fast, flexible, and simple data tables in React
glittershark.github.io/reactable
MIT License
1.51k stars 223 forks source link

Getting error: Cannot read property 'tr' of undefined #391

Open rkpatel33 opened 6 years ago

rkpatel33 commented 6 years ago

I am getting the following error when dropping the first simple example into a basic react component inside a React/Electron project:

image

Seems the line it's failing on is this one, with _react2['default'].DOM undefined.

image

Not sure what the issue could be, but maybe a version conflict between React and Reactable?

I am using the follow versions:

    "react": "^16.0.0",
    "react-dom": "^16.0.0",
    "reactable": "^0.14.1",
    "electron": "1.7.8",

    "babel-register": "^6.26.0", // to compile ES6

Here is the full code for my react component that is using Reactable:

// Libraries
import React from 'react';
import Reflux from 'reflux';

// Stores
import DashboardStore from '../../stores/DashboardStore.js';

// Components
import Label from '../base/Label.jsx';
import { Table } from 'reactable';

export default class DashboardPaneProfile extends Reflux.Component {
  constructor(props) {
    super(props);
    this.state = {};
    this.store = DashboardStore;
  }

  render() {
    return (
      <div className="al-dashboard-pane-profile">
        <h1>Profile</h1>

        <Table className="table" data={
          [
            { Name: 'Griffin Smith', Age: 18 },
            { Age: 23,  Name: 'Lee Salminen' },
            { Age: 28, Position: 'Developer' }
          ]
        } />
      </div>

    );
  }
}

// Types
DashboardPaneProfile.propTypes = {
};

// Defaults
DashboardPaneProfile.defaultProps = {
};
lukaszdobosz commented 6 years ago

Got the same, it's because of removed deprecation React.DOM, now it is in a separated lib react-dom-factories. Easy fix is to move back to react 15.

rkpatel33 commented 6 years ago

Ok, thanks! Think I will hold off on using it until it get's incorporated here.

birdwell commented 6 years ago

I'm getting the same. Sad that I'd have to change React version to get this library to work.

Perogy commented 6 years ago

Yep getting this as well. Unfortunately seems this is unusable on the latest version of react.