I have a field score
which is required. I want to provide a default value for it as a fallback, so the warning will be displayed in console but the app will work as normal meanwhile.
Score.defaultProps = {
dot : false,
score: 100
}
Score.propTypes = {
score: PropTypes.number.isRequired,
dot : PropTypes.bool
}
If I remove the the default value, it works as expected.
I'm in Storybook and I need to display a table with PropTypes as follows: