Closed
Description
Historically, React has logged warnings to console.error
(rather than console.warn
). I believe this has been done for a variety of reasons:
- Certain types of warnings may indicate a serious problem even if they are not always fatal.
- In the past, stack trace was not available with
console.warn
calls.
Deprecation warnings are intended to provide users a heads-up on features that will be changing/breaking in the next major release. Up until now we have also logged these warnings to console.error
. This makes them more noticeable but comes at the cost of:
- Potentially over-emphasizing the urgency of addressing them. (eg you should address them before upgrading to the next major, you don't need to address the now).
- Potentially causing CI test failures for certain runners that treat unexpected
console.error
calls as fatal.
After some discussion the React team has decided to replace console.error
calls with console.warn
for deprecation warnings only. We intend to release this change in the upcoming 15.6 release.
Metadata
Metadata
Assignees
Labels
No labels
Activity