Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

README: clarify what "optional" means #324

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

cben
Copy link

@cben cben commented Aug 24, 2020

Based on all the "should be implicitly optional and not warn without values" tests.

Based on all the "should be implicitly optional and not warn without values" tests.
@facebook-github-bot
Copy link

Hi @cben!

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.

In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@@ -65,7 +65,7 @@ class MyComponent extends React.Component {

MyComponent.propTypes = {
// You can declare that a prop is a specific JS primitive. By default, these
// are all optional.
// are all optional - `undefined` and `null` are allowed.
Copy link
Contributor

Choose a reason for hiding this comment

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

in addition, they can be omitted entirely (which is distinct from being present but undefined). let's note that too!

@ljharb ljharb marked this pull request as draft May 18, 2021 20:43
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants