Without using class, how do I use PropTypes in functional stateless component of react?
export const Header = (props) => ( hi )
It isn't different with the stateful, You can add it like:
import PropTypes from 'prop-types'; Header.propTypes = { title: PropTypes.string }
Here is a link to prop-types npm