Closed fson closed 8 years ago
Because date is required in both propTypes and contextTypes, a warning is shown even if you pass it in as a prop. Example:
date
propTypes
contextTypes
var DatePicker = React.createClass({ render() { return <Month date={moment()} /> } });
Prints Warning: date is required in Month Check the render method of DatePicker. in the console.
Warning: date is required in Month Check the render method of DatePicker.
:+1:
Because
date
is required in bothpropTypes
andcontextTypes
, a warning is shown even if you pass it in as a prop. Example:Prints
Warning: date is required in Month Check the render method of DatePicker.
in the console.