File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -157,9 +157,9 @@ Please be minded that only if the component has more than one child node, you co
157
157
158
158
Components have many specific attributes which are called ”props” in React and can be of any type.
159
159
160
- Sometimes you need a way to validate these props. You don't want users input anything into your components.
160
+ Sometimes you need a way to validate these props. You don't want users input anything into your components.
161
161
162
- React has a solution for this and it's called propTypes .
162
+ React has a solution for this and it's called PropTypes .
163
163
164
164
``` javascript
165
165
var MyTitle = React .createClass ({
@@ -173,7 +173,7 @@ var MyTitle = React.createClass({
173
173
});
174
174
```
175
175
176
- The above component of ` Mytitle ` has a props of ` title ` . PropTypes tells React that title is required and its value should be string.
176
+ The above component of ` Mytitle ` has a props of ` title ` . PropTypes tells React that the title is required and its value should be string.
177
177
178
178
Now we give ` Title ` a number value.
179
179
You can’t perform that action at this time.
0 commit comments