Closed NemanjaManot closed 5 years ago
Looking at that error message, it looks like you’re providing an array to oneOfType whose third item is undefined. Can you share the code that creates that propType?
For example:
children: PropTypes.oneOfType([
PropTypes.arrayOf(PropTypes.node),
PropTypes.node
]).isRequired
datePickerValue: PropTypes.oneOfType([
PropTypes.object,
PropTypes.number,
PropTypes.string
]),
Both of those look correct; are you sure those are the lines that are erroring?
I found the error - spelling! @ljharb thank you, you helped me
I am using Jest, and i got this warning when i am running my tests:
console.error node_modules/prop-types/factoryWithTypeCheckers.js:23 Warning: Invalid argument supplied to oneOfType. Expected an array of check functions, but received undefined at index 2.
Versions:
Does anyone know that is a problem?