@samitouri / QOS-React-2 / commits / 7fefab5946

Added example of objectOf usage in documentation.

Mathieu M-Gosselin committed Jun 17, 2014 at 23:43 UTC 7fefab59461dbcda6858146f6d4a2d13d80d7760
1 file changed +3
docs/docs/05-reusable-components.md
+3
@@ -51,6 +51,9 @@ React.createClass({
51 // An array of a certain type
52 optionalArrayOf: React.PropTypes.arrayOf(React.PropTypes.number),
53
54 + // An object with property values of a certain type
55 + optionalObjectOf: React.PropTypes.objectOf(React.PropTypes.number),
56 +
57 // An object taking on a particular shape
58 optionalObjectWithShape: React.PropTypes.shape({
59 color: React.PropTypes.string,