Skip to content

Bug: Error message prints "Warning: ..." instead of "Error: ..." #20981

Description

@kokushkin

React version:

Steps To Reproduce

  1. Go at https://codesandbox.io/s/warning-issue-formik-v2-tutorial-start-forked-lwtxx?file=/src/index.js and type something in the Tool ID field. This reproduces one of these errors-warnings..
  2. Take a look in the console and you will see an Error but.. a Warning, or Error (in fact it's considered to be an error)... , which is simply confusing.
    image

Link to code example: https://codesandbox.io/s/warning-issue-formik-v2-tutorial-start-forked-lwtxx?file=/src/index.js

The current behavior

prints: "Warning: A component is changing an uncontrolled..."

The expected behavior

should be "Error: A component is changing an uncontrolled..." here and in all such cases.

I've initially created #20912 (everything ok there) , but now I've dived deeper in this, I've read this #16753 and understand the concept. So now, the solution (that would be in alignment with #16753 by the way) would be simply to make minor changes here https://github.com/facebook/react/blob/master/packages/shared/consoleWithStackDev.js
Expression-4 (1)

and then run test and update the red tests. Also, maybe in the consoleWithStackDev.www.js ..

By the way, what is this about? (RN?))

// Careful: RN currently depends on this prefix

Maybe this is why it wasn't done before?)

Seems like a very obvious thing and I surprised nobody raised an issue (or maybe did but I could not find it).

Anything opposing these changes?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Resolution: StaleAutomatically closed due to inactivityStatus: UnconfirmedA potential issue that we haven't yet confirmed as a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions