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

Ensure all class constructors call super with props #8

Merged
merged 1 commit into from
Oct 7, 2017
Merged

Ensure all class constructors call super with props #8

merged 1 commit into from
Oct 7, 2017

Conversation

yangshun
Copy link
Contributor

@yangshun yangshun commented Oct 6, 2017

I'm not sure whether it is strictly necessary for "Class components should always call the base constructor with props", but it is mentioned here so I think this should be enforced in the documentation at the very least.

@reactjs-bot
Copy link

reactjs-bot commented Oct 6, 2017

Deploy preview ready!

Built with commit 7c6f185

https://deploy-preview-8--reactjs.netlify.com

Copy link
Contributor

@bvaughn bvaughn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not strictly necessary since we explicitly set props on the instance after construction (in case people forget to pass them to the super constructor) but it is good to show this in the docs. 👍

@bvaughn bvaughn merged commit 463640d into reactjs:master Oct 7, 2017
@yangshun yangshun deleted the constructor-props branch October 7, 2017 01:33
@kail-287 kail-287 mentioned this pull request Dec 19, 2019
jhonmike pushed a commit to jhonmike/reactjs.org that referenced this pull request Jul 1, 2020
* Update reference-javascript-environment-requirements.md

* Corrigido links para o MDN

* modifications

* Improved/Fixed some translations.
BetterZxx pushed a commit to BetterZxx/react.dev that referenced this pull request Mar 21, 2023
* docs(cn): add `Thinking in React` translations

* docs(cn): add translation for `mock`

* docs(cn): modify phrasing in regard to review suggestions

* docs(cn): changes regarding review feedback

* docs(cn): rephrase some words & remove control characters

* docs(cn): revert Wikipedia links to English version

* docs(cn): changes for overall smoothness
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants