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

Warning: React component classes must extend React.Component. - 0.14 rc1 #4836

Closed
chandu0101 opened this issue Sep 10, 2015 · 9 comments
Closed
Assignees
Milestone

Comments

@chandu0101
Copy link

http://stackoverflow.com/questions/32509891/warning-react-component-classes-must-extend-react-component-0-14-rc1

@tonyhb
Copy link

tonyhb commented Sep 10, 2015

Getting this with RC1 too, and also getting invalid proptypes for children:

static propTypes = {
  children: React.PropTypes.node.isRequired
}

When passing down JSX nodes we get this error:

Warning: Failed propType: Invalid prop ​`children`​ supplied to ​`Card`​, expected a ReactNode. Check the render method of ​`ContainerStatus`​.

Might this be because of the same checking? If not will open a separate issue.

@zpao
Copy link
Member

zpao commented Sep 10, 2015

@tonyhb no that would be unrelated. Can you file a new issue with code to reproduce.

@tonyhb
Copy link

tonyhb commented Sep 10, 2015

Will do.

@luisrudge
Copy link

I'm having this problem using this lib (https://github.com/davidguttman/react-pivot/blob/master/index.jsx) as well. any thoughts?

@luisrudge
Copy link

@spicyj thoughts on this one?

@sophiebits
Copy link
Collaborator

@luisrudge Guessing react-pivot has its own copy of React. Try rm -rf node_modules/react-pivot/node_modules/react/.

@luisrudge
Copy link

I'm using npm3, so it's all flattened

@chandu0101
Copy link
Author

more context : scala-js/scala-js#1900

@sophiebits
Copy link
Collaborator

Need to investigate how IE9 and IE10 behaves with these static properties. For anyone in this thread who's not on IE and not using scala-js, please file separate issues with repro steps.

@sophiebits sophiebits added this to the 0.14 milestone Sep 14, 2015
sebmarkbage added a commit to sebmarkbage/react that referenced this issue Oct 1, 2015
Put the flag on the prototype instead to help certain limited forms
of class extensions that doesn't properly transfer static properties.

Fixes facebook#4836
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

6 participants