reactjstypescriptgoogle-chrome-devtools

Some console message text grey in color in chrome dev tools?


When I open console in Chrome Dev tools I can see some console messages are in grey text and some others in normal text. Why some console messages are in grey color?

enter image description here

I am using react and debugging my app using Chrome Dev tools, mostly by console.log method in Typescript.

My Research I have found my threads explaining how we can set colors for console messages. But that is not what I am looking for.

My Question I want to know why some messages are grey in console.


Solution

  • The messages are dimmed by the React Developer Tools extension. In strict mode, React calls many functions (components, effects, ...) twice, and console log invocations from the second call are dimmed. They wouldn't happen at all in production.

    It's also described in React docs on strict mode.