Search code examples
reactjstypescriptreact-devtools

React Developer Tools shows all components as "Anonymous"


I've installed the React Developer Tools extension on Google Chrome to debug a React application written in TypeScript, but once I start debugging the application and open the "Components" window, all components are shown as "Anonymous".

Granted, the application uses mostly function components.

Does anyone know if there is a way to get React Developer Tools to show component names in its component tree?


Solution

  • If you're using an exported anonymous functional component or a memo'ed component; it would be shown as Anonymous

    Refer this - https://github.com/facebook/react/issues/17876

    Or try solutions mentioned here - React Dev tools show my Component as Unknown