Skip to content
This repository has been archived by the owner on Jan 15, 2022. It is now read-only.

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

Open
rkpatel33 opened this issue Nov 17, 2017 · 4 comments
Open

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

rkpatel33 opened this issue Nov 17, 2017 · 4 comments

Comments

@rkpatel33
Copy link

rkpatel33 commented Nov 17, 2017

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
Copy link

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
Copy link
Author

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

@birdwell
Copy link

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

@Perogy
Copy link

Perogy commented Dec 28, 2017

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants