From 7c277b1f8ccaf5160d460e11e105fe4722b2a14a Mon Sep 17 00:00:00 2001 From: Mathieu M-Gosselin Date: Tue, 17 Jun 2014 23:43:25 -0400 Subject: [PATCH] Added example of objectOf usage in documentation. --- docs/05-reusable-components.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/05-reusable-components.md b/docs/05-reusable-components.md index 89dfba5d..ceb830b9 100644 --- a/docs/05-reusable-components.md +++ b/docs/05-reusable-components.md @@ -51,6 +51,9 @@ React.createClass({ // An array of a certain type 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 optionalObjectWithShape: React.PropTypes.shape({ color: React.PropTypes.string,