While running this code I got error on the first line on App.propTypes
TypeError: Cannot read property \'array\' of undefined
You should change React.PropTypes.array.* to PropTypes.array.*
App.propTypes = {
propArray: PropTypes.array.isRequired,
propBool: PropTypes.bool.isRequired,
propFunc: PropTypes.func,
propNumber: PropTypes.number,
propString: PropTypes.string,
propObject: PropTypes.object,
headerProp: PropTypes.string,
contentProp: PropTypes.string
}
App.defaultProps = {
headerProp: "Header from props...",
contentProp:"Content from props...",
propArray: [1,2,3,4,5],
propBool: true,
propFunc: function(e){return e},
propNumber: 1,
propString: "String value...",
propObject: {
objectName1:"objectValue1",
objectName2: "objectValue2",
objectName3: "objectValue3"
}
}