You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Will this library continue to support PropTypes validation? If yes, in which way?
I'm asking because I don't plan to move to TypeScript, so my only option for now is to write a custom babel-plugin which will call prop-types/checkPropTypes'.
The text was updated successfully, but these errors were encountered:
Given that React >= 19 won't actually run propTypes validators, I'm not sure what continued support here looks like. iow, I'll of course continue to fix bugs, but unless someone comes up with a good approach (perhaps, your babel plugin) to keep using PropTypes with components, I expect usage of packages like this to fade.
I've just faced another issue: latest prop-types relies on old react-is version, which does not support Symbol.for(react.transitional.element) as a $$typeof. Means that using PropTypes.element also needs to be transformed somehow, as prop-types is archived and cannot be upgraded.
I (I mean ChatGPT) wrote a simple plugin that allows to run _checkPropTypes with forbidExtraProps (maybe it's enough for other custom validators too) .
But seems like this $$typeof issue is in another dimension. I think I will write my own utils/reactElementPropType.js prop type, which will just proxy to the latest reactIs.isElement version. Maybe adding this updated element to this lib could be named as a "continued support".
Will this library continue to support PropTypes validation? If yes, in which way?
I'm asking because I don't plan to move to TypeScript, so my only option for now is to write a custom babel-plugin which will call
prop-types/checkPropTypes'
.The text was updated successfully, but these errors were encountered: