I have the following PropTypes:
SmartTable.propTypes = { name: React.PropTypes.string.isRequired, cols: React.PropTypes.array.isRequired, rows: React.PropTypes.array.isRequired, }; but the linter says me:
Prop type "array" is forbidden, how can I change it?
A possible solution for this (but I think it is not smart):
SmartTable.propTypes = { name: React.PropTypes.string.isRequired, cols: React.PropTypes.arrayOf(React.PropTypes.string), rows: React.PropTypes.arrayOf(React.PropTypes.string), };
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With