In this code when i write proptypes with camel case it shows me empty page and when i write it with upper case (PropTypes) it shows me : compiled with problems Line 39:9: Typo in static class property declaration
CODE :
Contact.PropTypes = {
data: PropTypes.object.isRequired
}
Clean contact cards with no errors using data from the contacts component
React components use a special property named propTypes to set up type checking and then you need to use PropTypes to define the type
It should be like this:
Contact.propTypes = {
data: PropTypes.object.isRequired
}
And you need:
import { PropTypes } from 'prop-types';