React: 'Warning: ' messages should use console.warn()

Created on 5 Apr 2016  路  1Comment  路  Source: facebook/react

Currently they use console.error(), which overestimates their severity and causes devs to react more strongly than the message might imply.

Example:

warning.js:45 
Warning: Failed propType: Invalid prop `things` of type `array` supplied to `Item`, expected `object`. Check the render method of `Connect(Item)`.

>All comments

Thanks for the feedback but this is intentional. console.error provides good stack traces and our treatment of warnings is that they _should_ be fixed before they are committed and shipped. With maybe 1 exception, I think they should all be fixable.

One of the things we're working towards is a better way to manage these so that you can silence specific warnings or types of warnings without having to fork React. You can track that in the umbrella issue - https://github.com/facebook/react/issues/5306

Was this page helpful?
0 / 5 - 0 ratings