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

Additional information on PropTypes.func #10301

Closed
wants to merge 1 commit into from
Closed

Conversation

kdr1
Copy link

@kdr1 kdr1 commented Jul 27, 2017

Added clarification that PropTypes.func can be used to check for a class components.

Added clarification that PropTypes.func can be used to check for a class components.
@kdr1
Copy link
Author

kdr1 commented Jul 27, 2017

My apologizes, first pull request. I didn't realize I needed to run tests considering I updated a line in prop-types documentation only. Nothing that tests would run on. Once again sorry, but how should I proceed?

@@ -56,6 +56,9 @@ MyComponent.propTypes = {

// A React element.
optionalElement: PropTypes.element,

// A function or class
optionalElement: PropTypes.func
Copy link
Contributor

Choose a reason for hiding this comment

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

It's not valid to define the same property twice. Instead use PropTypes.oneOfType([...])

@bvaughn
Copy link
Contributor

bvaughn commented Oct 8, 2017

Thank you for filing this PR!

I'm sorry to be the bearer of bad news, but the documentation and source code for reactjs.org now lives in a different repository: reactjs/reactjs.org. (For more info on why we made this move, see issue #11075.)

Would you be willing to re-open this PR on the new repo? I promise we'll review it quickly!

@bvaughn bvaughn closed this Oct 8, 2017
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.

3 participants