UpTest > Web Development > ReactJS Test

Test: ReactJS Test

Question 9: Prev Next Hide answers

What is wrong with the following code?

MyComponent.propTypes = {
  name: React.PropTypes.string
MyComponent.defaultProps = {
  name: 'My name'
default value is not necessary
0 votes
defaultProps should be defaultProperties
0 votes
MyComponent.propTypes is a function not an object
0 votes
nothing is wrong 

3 votes
Please login to submit your answer.