React PropTypes help with typechecking on the props for a component. When a invalid value is provided for a prop,a warning will be shown in the JavaScript console. PropTypes is only checked in development mode.

import PropTypes from 'prop-types';

class MyHeader extends React.Component {
    render() {
        return (
            <h1>{this.props.value}</h1>
        )
    }
}

MyHeader.propTypes = {
    value: PropTypes.string.isRequired
};

References: