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
{{ message }}
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.
@ljharb suggested here to open a new issue to verify react fragment proptypes: #211 (comment)
Just to give more context, for react-intl FormattedMessage component, I'd like to submit a PR to add support for fragments.
Currently the lib has tagName: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
I want to submit a PR to update to something like tagName: PropTypes.oneOfType([PropTypes.string, PropTypes.element, React.Fragment]),
The lib is able to support fragments at runtime. I'm already using tagName=Fragment. I just want a solution to remove the propTypes warning I have when using Fragments.
I've noticed it works with elementType but I guess my PR wouldn't be accepted by react-intl team as it's a bit too "wide" and less specific
The text was updated successfully, but these errors were encountered:
I'm currently using PropTypes.symbol as a work around to suppress the error. I'm not sure if that is specific enough to avoid any possible edge cases though.
TS isn’t a replacement for PropTypes; it can check number but not integer; it doesn’t have negated types yet; it can’t do ranges, or many other things. I’d strongly suggest using both.
However. I’ll close this, if you no longer have the feature request.
@ljharb suggested here to open a new issue to verify react fragment proptypes: #211 (comment)
Just to give more context, for react-intl FormattedMessage component, I'd like to submit a PR to add support for fragments.
Currently the lib has
tagName: PropTypes.oneOfType([PropTypes.string, PropTypes.element]),
I want to submit a PR to update to something like
tagName: PropTypes.oneOfType([PropTypes.string, PropTypes.element, React.Fragment]),
The lib is able to support fragments at runtime. I'm already using tagName=Fragment. I just want a solution to remove the propTypes warning I have when using Fragments.
I've noticed it works with
elementType
but I guess my PR wouldn't be accepted by react-intl team as it's a bit too "wide" and less specificThe text was updated successfully, but these errors were encountered: