Answer the question
In order to leave comments, you need to log in
Uncaught TypeError: _propTypes2.default.ArrayOf is not a function?
I get this error "Uncaught TypeError: _propTypes2.default.ArrayOf is not a function". And I do not understand what the problem is and I will be very grateful for the help and clarification. Below is the entire validation part with PropTypes:
OrdersTab.propTypes = {
toggleTab: PropTypes.func.isRequired,
orders: PropTypes.ArrayOf(
PropTypes.shape({
id: PropTypes.number,
orderedProducts: PropTypes.arrayOf(PropTypes.string),
orderedAt: PropTypes.string,
}),
).isRequired,
addOrder: PropTypes.func.isRequired,
orderIsReady: PropTypes.func.isRequired,
};
Answer the question
In order to leave comments, you need to log in
orders: PropTypes.ArrayOf <<<- capitalized, but it should be arrayOf
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question