react-video icon indicating copy to clipboard operation
react-video copied to clipboard

Component breaks in React 0.13.x

Open Zenwolf opened this issue 9 years ago • 10 comments

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 avatar Apr 09 '15 18:04 Zenwolf

FYI: https://github.com/facebook/react/issues/2661

Zenwolf avatar Apr 09 '15 18:04 Zenwolf

Looks like this was fixed in https://github.com/pedronauck/react-video/commit/590f6d4e94e14e87c6020e68e523d7aa309ef9a3#diff-69684a9e505635d4c0f1c87dc55ced25 and then reverted again in https://github.com/pedronauck/react-video/commit/0b235ea2fbea6d21f30843447686e33e84851598#diff-69684a9e505635d4c0f1c87dc55ced25

Zenwolf avatar May 26 '15 22:05 Zenwolf

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 avatar Jun 12 '15 17:06 Ganonside

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.

Ganonside avatar Jun 12 '15 17:06 Ganonside

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

Zenwolf avatar Jun 12 '15 18:06 Zenwolf

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

giodamelio avatar Jul 26 '15 19:07 giodamelio

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

mordrax avatar Sep 10 '15 06:09 mordrax

Same problem - solutions?

chrisfinch avatar Nov 26 '15 20:11 chrisfinch

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!

Kadrian avatar Jan 02 '16 12:01 Kadrian

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!

breadstickguy avatar Mar 18 '16 00:03 breadstickguy