Closed davegomez closed 2 years ago
Hi Dave,
Would it be possible to recreate your issue simplified in a code sandbox? If so, I can look into it and see what I can do for you.
In the meantime, if you have control over the component that you're searching for, you could use a customTypeKey to do the searching which will avoid this line.
Thank you for the swift response Michael.
I'll give it a try to the solution you propose and I will work on a sandbox this weekend to reproduce the issue.
@TheSpicyMeatball using a custom type key worked to solve my issue. So I'm closing this but I still owe you the sandbox so you can check how it works with the PropTypes.
Thank you.
First of all, thank you for this library. Very useful.
I'm using PropTypes for type checking in my project (company) requirement and I'm getting a warning that says:
This happens when I use
getChildrenByTypeDeep
to scrape thechildren
props and use them in the parent component.The stack trace took me to this line just before PropTypes kicks in and tries to validate the types:
Needless to say, the props are not
undefined
and the warning appears both in the browser console and in the tests output.