Skip to content

Bug: disableLogs mutates console #20575

Closed
@jcdang

Description

@jcdang

It's noted on the docs pages at https://reactjs.org/docs/strict-mode.html

react-dom currently disables/mutates the global console in strict mode.

This seems to be an intentional feature/bug that's an unnecessary inconvenience.

React version: 17.0.1

Steps To Reproduce

  1. Use react-dom in strict mode
  2. Try to log something

The current behavior

logging is disabled in strict-mode

The expected behavior

Possible better solutions:

  • Make it more obvious that the console is being mutated/disabled
  • Use a proxy

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: 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