Closed Kegulf closed 2 years ago
maybe @ljharb has any clue what happens here? 😅
I have no idea how that PR could have broken it, but I’ll definitely look into it today.
Can you share a bit more about your setup? There's extensive tests that PR adds to that already prove this works - and if this didn't work, I'd expect it to take much less than 6 days for the first bug report.
In particular, a codesandbox that reproduces it would be most helpful.
This error also occurs on our project RegardsOSS.
We downgraded to 15.7.2 for now, no time to investigate this issue yet
I will be happy to fix it once it’s reproducible.
This happened in our codebase aswell. The warning was caused by using
options: PropTypes.shape({
readOnly: PropTypes.boolean,
}),
changing it to
options: PropTypes.shape({
readOnly: PropTypes.bool,
}),
helped.
In the above examples there is
title: PropTypes.string.isrequired,
Maybe try changing it to (note the camel case)
title: PropTypes.string.isRequired,
will help, too.
Thanks, my build is passing now. I had some invalid proptypes that are reported with this updates.
I just had to fix them
That’s great! So it sounds like v15.8 is helping you find invalid PropTypes, and isn’t actually breaking anything that should be working?
Yes, any key associated with an undefined value now warns
I had function
instead of func
, boolean
instead of bool
, PropTypes.date
instead of PropTypes.string
, isRquired
instead of isRequired
.... This is a good release, thanks !
@Kegulf given this, I’m going to close this issue, but will be happy to reopen it if there’s a repro case for something failing that should work.
propChecking related to
PropTypes.shape
being used with objects and class-instances seems to be broken in v15.8.0. It works in v15.7.2.I think that it's this PR that broke it.
The result is my tests failing with the following warning:
My specific case:
It also fails when I try to take in a
shape
instead ofarrayOf(shape)
:It fails with the same warning if I change
receiptLinks
to JS-objects as well: