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

Interest in changing from React.createClass to extending React.Component? #1179

Closed
waywardmonkeys opened this issue Mar 12, 2016 · 7 comments

Comments

@waywardmonkeys
Copy link
Contributor

In the current repository, there are 113 instances where React.createClass is called and 17 where React.Component is extended. Is there interest in changing over to extending React.Component if someone does the boring work?

@afc163
Copy link
Member

afc163 commented Mar 12, 2016

That will be a good improvement, pull request welcomes~

@waywardmonkeys
Copy link
Contributor Author

Will do!

@benjycui
Copy link
Contributor

It's a good chance to unified antd's code convention, see: #1244

@afc163
Copy link
Member

afc163 commented Mar 25, 2016

Already done! Thank U @waywardmonkeys

@afc163 afc163 closed this as completed Mar 25, 2016
@waywardmonkeys
Copy link
Contributor Author

Not actually complete yet ... have to deal with event handler binding and then convert the remaining usages of React.createClass. :)

@afc163 afc163 reopened this Mar 25, 2016
@benjycui
Copy link
Contributor

Done: 0ebf6c2

Demos will keep using React.createClass:

  1. We do not recommend our user to use ES7 now.
  2. React.createClass will bind this automatically.

@afc163 afc163 closed this as completed Apr 19, 2016
@lock
Copy link

lock bot commented May 5, 2018

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2018
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

3 participants