You get a bonus - 1 coin for daily activity. Now you have 1 coin

What is a React array type with a shape? in REACT

Practice



If you want to pass an array of objects with a particular shape to a component, use

React.PropTypes.shape()
as the argument to
React.PropTypes.arrayOf()
.
ReactComponent.propTypes = {
  arrayWithShape: React.PropTypes.arrayOf(React.PropTypes.shape({
    color: React.PropTypes.string.isRequired,
    fontSize: React.PropTypes.number.isRequired
  })).isRequired
}

Comments

To leave a comment

If you have any suggestion, idea, thanks or comment, feel free to write. We really value feedback and are glad to hear your opinion.
To reply

Lectures and tutorial on "Scripting client side JavaScript, jqvery, BackBone"

Terms: Scripting client side JavaScript, jqvery, BackBone