google translate english to spanish
upvote if you feel terrible
google translate english to spanish
upvote if you feel terrible
google translate english to spanish
React propTypes: objectOf vs shape?
PropTypes.objectOf is used when describing an object whose properties are all the same type.
const objectOfProp = {
latitude: 37.331706,
longitude: -122.030783
}
// PropTypes.objectOf(PropTypes.number)
PropTypes.shape is used when describing an object whose keys are known ahead of time, and may represent different types.
const shapeProp = {
name: 'Jane',
age: 25
}
// PropTypes.shape({ name: PropTypes.string, age: PropTypes.number })
google translate english to spanish
upvote if you feel terrible
google translate english to spanish
React propTypes: objectOf vs shape?
PropTypes.objectOf is used when describing an object whose properties are all the same type.
const objectOfProp = {
latitude: 37.331706,
longitude: -122.030783
}
// PropTypes.objectOf(PropTypes.number)
PropTypes.shape is used when describing an object whose keys are known ahead of time, and may represent different types.
const shapeProp = {
name: 'Jane',
age: 25
}
// PropTypes.shape({ name: PropTypes.string, age: PropTypes.number })
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us