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

IE8-10: Warning: Component(...): React component classes must extend React.Component. #4990

Closed
syranide opened this issue Sep 28, 2015 · 9 comments
Milestone

Comments

@syranide
Copy link
Contributor

Transpiled with babeljs. Not observed in modern browsers.

class Example extends React.Component {
  render() {
    return null;
  }
}

ReactDOM.render(
  React.createElement(Example),
  document.body
);

// Warning: Component(...): React component classes must extend React.Component.

It's possible this is actually an issue with babeljs, I'm not really sure.

cc @spicyj

@sophiebits
Copy link
Collaborator

I realized this last week and didn't get a chance to test it. Glad to know it's not entirely in my head. We'll figure out a fix.

@sophiebits sophiebits added this to the 0.14 milestone Sep 28, 2015
@sophiebits
Copy link
Collaborator

Merging into #4990.

@jimfb
Copy link
Contributor

jimfb commented Sep 29, 2015

@spicyj Merging into self? Is there a different issue you intended to link?

@sophiebits
Copy link
Collaborator

Thanks, I meant #4836.

@dtothefp
Copy link

@syranide @spicyj did this end up being an issue with Babel or React? I'm seeing the same warnings in IE9 using 0.14.0-rc1

PS I'm putting this issue here because my question is not related to scala-js

@sophiebits
Copy link
Collaborator

It hasn't been fixed. #4836 will have updates when it is (which will happen before 0.14).

@dtothefp
Copy link

dtothefp commented Oct 2, 2015

@spicyj will this currently have any negative effect on production code or is it only a warning in NODE_ENV="development"?

I'm using the syntax

import React, {Component} from 'react';

class Whatevsss extends Component {

not sure if it is effected by just doing

class Whatevsss extends React.Component {

@sophiebits
Copy link
Collaborator

Both of those are fine. In prod mode we skip the check but your code will break in 0.15 if it's triggering the warning now.

@dtothefp
Copy link

dtothefp commented Oct 2, 2015

@spicyj but the warning is due to issue resolved here #4836 correct? Any plan for release soon?

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

4 participants