Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Component breaks in React 0.13.x #25

Open
Zenwolf opened this issue Apr 9, 2015 · 10 comments
Open

Component breaks in React 0.13.x #25

Zenwolf opened this issue Apr 9, 2015 · 10 comments

Comments

@Zenwolf
Copy link

Zenwolf commented Apr 9, 2015

This component is using the legacy API, not React.createElement or React.createFactory.

Warning: Something is calling a React component directly. Use a factory or JSX instead. See: http://fb.me/react-legacyfactory
ReactClass.js:842 Uncaught TypeError: Cannot read property '__reactAutoBindMap' of undefined
@Zenwolf
Copy link
Author

Zenwolf commented Apr 9, 2015

FYI: facebook/react#2661

@Zenwolf
Copy link
Author

Zenwolf commented May 26, 2015

Looks like this was fixed in 590f6d4#diff-69684a9e505635d4c0f1c87dc55ced25 and then reverted again in 0b235ea#diff-69684a9e505635d4c0f1c87dc55ced25

@Ganonside
Copy link

I'm using react v0.13.3
I'm having the same issue using react/addons

The weird thing is that it only throws an error if I use components from a different file.

The following code throws the error mentioned at the top of this thread.

// Main.jsx
import React from 'react/addons';
import SomeComponent from './SomeComponent.jsx';

export default React.createClass({
  render() {
    return (
      <SomeComponent />
    );
  }
});

// SomeComponent.jsx
import React from 'react';

export default React.createClass({
  render() {
    return (
      <div></div>
    );
  }
});

While this code works fine.

import React from 'react/addons';

var SomeComponent = React.createClass({
  render() {
    return (
      <div></div>
    );
  }
});

export default React.createClass({
  render() {
    return (
      <SomeComponent />
    );
  }
});

@Ganonside
Copy link

I solved my problem. I was importing the component from a file that only used react into a file that used react/addons. Hope this helps.

@Zenwolf
Copy link
Author

Zenwolf commented Jun 12, 2015

Interesting. I only use the react/addons version of react throughout my entire application.

@giodamelio
Copy link

I am getting the problem, and I am not using react/addons anywhere.

@mordrax
Copy link

mordrax commented Sep 10, 2015

I'm having the same issue using 0.13.3, any updates on how to fix this?

@chrisfinch
Copy link

Same problem - solutions?

@Kadrian
Copy link

Kadrian commented Jan 2, 2016

I'd love to get this working in React 0.14.x, but don't know what needs to be changed? I'd be happy to help!

@breadstickguy
Copy link

This is still an issue with this module. I tried to use this and it still calls react directly. Happy to help contribute if needed!

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

No branches or pull requests

7 participants