Browse Source

Added example of objectOf usage in documentation.

main
Mathieu M-Gosselin 10 years ago
parent
commit
7c277b1f8c
  1. 3
      docs/05-reusable-components.md

3
docs/05-reusable-components.md

@ -51,6 +51,9 @@ React.createClass({
// An array of a certain type // An array of a certain type
optionalArrayOf: React.PropTypes.arrayOf(React.PropTypes.number), optionalArrayOf: React.PropTypes.arrayOf(React.PropTypes.number),
// An object with property values of a certain type
optionalObjectOf: React.PropTypes.objectOf(React.PropTypes.number),
// An object taking on a particular shape // An object taking on a particular shape
optionalObjectWithShape: React.PropTypes.shape({ optionalObjectWithShape: React.PropTypes.shape({
color: React.PropTypes.string, color: React.PropTypes.string,

Loading…
Cancel
Save