-
Notifications
You must be signed in to change notification settings - Fork 50.4k
Description
react-dom-stream helpfully checks propTypes while rendering static HTML to a stream. But of course React 15.2+ warns (in this case on a user Html Component with propTypes.head):
Warning: You are manually calling a React.PropTypes validation function for the head prop on Html. This is deprecated and will not work in the next major version. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.
The page at that link advises 3rd party libraries to use external PropType libraries, but that won't work in this case because react-dom-stream is trying to call the propTypes the user has put on their components, rather than providing helpers like the 3rd party libraries the author of that page seems to be considering (e.g. ImmutablePropTypes). To prevent these errors, the user would have to remove the propTypes on their components or replace the usages of React.PropTypes in their own code with some other library. If they were using 3rd party components that declare propTypes, they would be out of luck.
Is there an intended solution to this or was this conflict unanticipated?