We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60196fc commit 3515be7Copy full SHA for 3515be7
README.md
@@ -137,7 +137,7 @@ import PropTypes from 'prop-types';
137
* General component description.
138
*/
139
class MyComponent extends Component {
140
- render: function() {
+ render() {
141
// ...
142
}
143
@@ -146,7 +146,7 @@ MyComponent.propTypes = {
146
/**
147
* Description of prop "foo".
148
149
- foo: PropTypes.number,
+ foo: PropTypes.number.isRequired,
150
151
* Description of prop "bar" (a custom validation function).
152
@@ -176,7 +176,7 @@ we are getting this output:
176
"type": {
177
"name": "number"
178
},
179
- "required": false,
+ "required": true,
180
"description": "Description of prop \"foo\".",
181
"defaultValue": {
182
"value": "42",
0 commit comments