Skip to content

Suppress message: "Download the React DevTools for ..." #12041

Closed
@RRMoelker

Description

@RRMoelker

feature/bug

What is the current behavior?
React library logs either "Download the React DevTools for a better development experience: https://fb.me/react-devtools" or logs "Warning: The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://fb.me/react-devtools" if previous "fix" is employed.

reproduce
Run React site without production flag and without React DevTools extension installed.

What is the expected behavior?
No log output.

Which versions of React

React: 16.2.0

Tried
According to comment on #3877 the following should work in React >= 16.1.0.

      new webpack.DefinePlugin({
        '__REACT_DEVTOOLS_GLOBAL_HOOK__': '({ isDisabled: true })'
      }),

However this changes the log to:
"Warning: The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://fb.me/react-devtools"

Other fixes such as those from StackOverflow yield the same results: https://stackoverflow.com/a/42196820.

Also the plugin itself doesn't work for me because of facebook/react-devtools#897. So installing it isn't an option, for me at least.

TLDR

I'm loving React. But logging the install note is a tad annoying. Previous fixes don't seem to work. So please provide an option to disable the log.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions