Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

react proptypes example

// proptypes using class component
Detaljer.PropTypes = {
  detaljer: PropTypes.string.isRequired,
  feilkode: PropTypes.string,
  removeEvent: PropTypes.string.isRequired
};

// proptypes using function component
Detaljer.propTypes = {
  detaljer: PropTypes.string.isRequired,
  feilkode: PropTypes.string,
  removeEvent: PropTypes.string.isRequired
};
Source by www.npmjs.com #
 
PREVIOUS NEXT
Tagged: #react #proptypes
ADD COMMENT
Topic
Name
4+4 =