Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

react default proptypes

const Camper = (props) => {
  return (
    <p>{props.name}</p>
  )
};

Camper.defaultProps = {name: 'CamperBot'}
Camper.propTypes = { name: PropTypes.string.isRequired}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #react #default #proptypes
ADD COMMENT
Topic
Name
4+2 =